Search with excluding categories

Bugs which have been reproduced by a second user or the developer

Moderator: Dreamer

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

Search with excluding categories

Post by Nimrodel » Sun Apr 30, 2017 6:18 pm

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: 1534
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. » Mon May 01, 2017 7:12 am

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.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

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

Re: Search with excluding categories

Post by Nimrodel » Sun May 14, 2017 1:33 pm

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 » Sun May 14, 2017 1:37 pm

:D

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

Re: Search with excluding categories

Post by limar500 » Sat Jan 05, 2019 5:52 pm

hi, is there any update on this? I'm interested in this too

User avatar
xnview
Author of XnView
Posts: 31364
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Search with excluding categories

Post by xnview » 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?
Pierre.

User avatar
m.Th.
XnThusiast
Posts: 1534
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. » Wed Jan 09, 2019 5:49 pm

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.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
m.Th.
XnThusiast
Posts: 1534
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. » Wed Jan 09, 2019 5:51 pm

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

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
m.Th.
XnThusiast
Posts: 1534
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. » Thu Jan 10, 2019 8:49 am

...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.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
xnview
Author of XnView
Posts: 31364
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Search with excluding categories

Post by xnview » 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??
Pierre.

User avatar
m.Th.
XnThusiast
Posts: 1534
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. » Wed Jan 16, 2019 10:29 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??
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.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

heavyvoidx
Posts: 2
Joined: Thu May 09, 2019 7:53 pm

Re: Search with excluding categories

Post by heavyvoidx » Sat May 11, 2019 7:31 pm

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 » 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" ?

User avatar
m.Th.
XnThusiast
Posts: 1534
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Search with excluding categories

Post by m.Th. » Mon May 20, 2019 5:57 am

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.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

Post Reply