Search with excluding categories

*** Please report new bugs here! ***

Moderators: XnTriq, helmut, xnview, Dreamer

Post Reply
Nimrodel
Posts: 18
Joined: Mon Mar 20, 2017 5:02 pm

Search with excluding categories

Post by Nimrodel »

Hello!

Recently I saw a topic in the forum XnView Classic with someone posting exactly the same question I was asking myself: http://newsgroup.xnview.com/viewtopic.php?f=35&t=24822. Unfortunately there was no answer, so I post it here in MP quoting the question and hoping there will be an answer :wink:

"It would really be a great feature if there was a possibility to exclude some categories.
Ideally it would be just magical if user could construct his own searches with categories. Like you would like to find all pictures with keyword vacation that also include keywords for your wife or daughter but not with the beach keyword. That would make you cooler than ACDSee and Adobe Bridge.
Is it hard to implement? Shouldn't that be one of basic SQL features since XnView MP uses databases to store data?
"
User avatar
m.Th.
XnThusiast
Posts: 1662
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. »

It can be implemented - basically the two trees with categories (the one used for finding and assignment in Categories Pane AND the one used for filtering) should be merged and at the end of the newly created tree should be added a tree-state checkbox. The states are:

- checked: IN (included)
- not checked: NOT IN (excluded)
- grayed: - doesn't matter -

From SQL point of view the query can be constructed very simple by having the correspondent IN (myCatID1, myCatID2, myCatID3,...) and similar NOT IN clause. In fact it is more a string processing task which will build the SQL WHERE which will be passed to the DB. Details available for Pierre upon request.

Yep, of course it would be cooler than ACDSee and Bridge. ...and Lightroom (which is very slow on large datasets).

Already added in tracker here: http://www.xnview.com/mantisbt/view.php?id=389

We hope that we'll see it in the new version. :D It is a very important and requested feature.
m. Th.

- Dark Themed XnViewMP 1.6 64bit on Win11 x64 -
Nimrodel
Posts: 18
Joined: Mon Mar 20, 2017 5:02 pm

Re: Search with excluding categories

Post by Nimrodel »

Thanks for the answer, good to know that this is on the to-do list :)
bdragon
Posts: 108
Joined: Mon May 01, 2017 8:06 am

Re: Search with excluding categories

Post by bdragon »

:D
limar500
Posts: 10
Joined: Sat Sep 15, 2012 1:24 pm

Re: Search with excluding categories

Post by limar500 »

hi, is there any update on this? I'm interested in this too
User avatar
xnview
Author of XnView
Posts: 43328
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Search with excluding categories

Post by xnview »

m.Th. wrote: Mon May 01, 2017 7:12 am - checked: IN (included)
- not checked: NOT IN (excluded)
- grayed: - doesn't matter -
so a 3-states checkbox?
Pierre.
User avatar
m.Th.
XnThusiast
Posts: 1662
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. »

xnview wrote: Mon Jan 07, 2019 9:57 am
m.Th. wrote: Mon May 01, 2017 7:12 am - checked: IN (included)
- not checked: NOT IN (excluded)
- grayed: - doesn't matter -
so a 3-states checkbox?
Yes. This is the standard behavior in any such filtering engine. For the checked ones you will gather the IDs / PK (primary keys) put comma between them and add them in a SQL IN predicate. For the unchecked ones do the same but put the comma delimited PK values in a SQL NOT IN predicate in the WHERE clause.
m. Th.

- Dark Themed XnViewMP 1.6 64bit on Win11 x64 -
User avatar
m.Th.
XnThusiast
Posts: 1662
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. »

...of course, by default the 3-state checkbox will be 'Grayed' by default.
m. Th.

- Dark Themed XnViewMP 1.6 64bit on Win11 x64 -
User avatar
m.Th.
XnThusiast
Posts: 1662
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. »

...also don't forget to test the "Match" drop-down for "Any" and "All" predicates (that is AND and OR) in the case of the tri-state checkbox.
m. Th.

- Dark Themed XnViewMP 1.6 64bit on Win11 x64 -
User avatar
xnview
Author of XnView
Posts: 43328
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Search with excluding categories

Post by xnview »

m.Th. wrote: Wed Jan 09, 2019 5:51 pm ...of course, by default the 3-state checkbox will be 'Grayed' by default.
not too complicated for standard user??
Pierre.
User avatar
m.Th.
XnThusiast
Posts: 1662
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. »

xnview wrote: Thu Jan 10, 2019 4:23 pm
m.Th. wrote: Wed Jan 09, 2019 5:51 pm ...of course, by default the 3-state checkbox will be 'Grayed' by default.
not too complicated for standard user??
Nope. We use this paradigm in our programs which are used by VERY standard users (or even worse - no offense intended, some of the users of the programs which we make (develop) see the program as their very first experience on a computer, before learning Windows, Folders hierarchy, keyboard, File Open / Save etc. - basic things in computer usage). They find "Checked" "Empty = Unchecked" and "Grayed" paradigm very natural for "Yes", "No" and ...well "Grayed" = Undefined / Doesn't matter.
m. Th.

- Dark Themed XnViewMP 1.6 64bit on Win11 x64 -
heavyvoidx
Posts: 2
Joined: Thu May 09, 2019 7:53 pm

Re: Search with excluding categories

Post by heavyvoidx »

imho, this function is vital when searching through thousands of photos... can you say, please, whats the progress on it?
heavyvoidx
Posts: 2
Joined: Thu May 09, 2019 7:53 pm

Re: Search with excluding categories

Post by heavyvoidx »

xnview wrote: Thu Jan 10, 2019 4:23 pm
m.Th. wrote: Wed Jan 09, 2019 5:51 pm ...of course, by default the 3-state checkbox will be 'Grayed' by default.
not too complicated for standard user??
As the question is opened for years already, and the most problem is GUI changes:

Maybe the function can be implemented faster, without changing GUI (for the first time), by search text-field, where the user can manually write IN "tag 1" AND IN "tag 2" AND NOT IN "tag 3" ?
User avatar
m.Th.
XnThusiast
Posts: 1662
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. »

heavyvoidx wrote: Mon May 13, 2019 8:39 am
xnview wrote: Thu Jan 10, 2019 4:23 pm
m.Th. wrote: Wed Jan 09, 2019 5:51 pm ...of course, by default the 3-state checkbox will be 'Grayed' by default.
not too complicated for standard user??
As the question is opened for years already, and the most problem is GUI changes:

Maybe the function can be implemented faster, without changing GUI (for the first time), by search text-field, where the user can manually write IN "tag 1" AND IN "tag 2" AND NOT IN "tag 3" ?
To quote Pierre: I think that this is "too complicated for the user" :) - I would say that it isn't discoverable. The user doesn't know that such a possibility exists and also, implementing a parser most probably is more difficult than adding some checkboxes to GUI.
m. Th.

- Dark Themed XnViewMP 1.6 64bit on Win11 x64 -
gendalf
Posts: 65
Joined: Thu Aug 04, 2011 1:26 pm

Re: Search with excluding categories

Post by gendalf »

add an exclusion/blacklist option, for example to search for all images but selected couple of formats
Post Reply