Questions about Categories

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

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

Re: Questions about Categories

Post by xnview »

oops66 wrote: Image
it's perhaps better and more user friendly than having AND/OR/NOT for each line??
Pierre.
jonha4711
Posts: 62
Joined: Mon Feb 08, 2016 4:35 pm

Re: Questions about Categories

Post by jonha4711 »

xnview wrote:
oops66 wrote: Image
it's perhaps better and more user friendly than having AND/OR/NOT for each line??
Well, this is probably slightly easier to understand but it's not nearly as powerful as a fully-fledged AND/OR/NOT capability. If you add a drop-down box *after* each condition linking it with the following condition (along the lines of what photoken wrote), I think the best would be to offer the following 4 choices:
1. AND
2. OR
3. AND NOT
4. OR NOT
These should be pretty self explanatory.

I for one would very much appreciate an extended search feature.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Questions about Categories

Post by xnview »

jonha4711 wrote: Well, this is probably slightly easier to understand but it's not nearly as powerful as a fully-fledged AND/OR/NOT capability. If you add a drop-down box *after* each condition linking it with the following condition (along the lines of what photoken wrote), I think the best would be to offer the following 4 choices:
1. AND
2. OR
3. AND NOT
4. OR NOT
These should be pretty self explanatory.
but it can become complicated for the user i think
For C1 AND C2 OR C3, is it ((C1 AND C2) OR C3) or (C1 AND (C2 OR C3))
Pierre.
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Questions about Categories

Post by oops66 »

xnview wrote:
oops66 wrote: Image
it's perhaps better and more user friendly than having AND/OR/NOT for each line??
... For me both are OK ;-) ... In a first time Digikam used the "OR, AND, NOT and ()" items, but now it is more user friendly for most of the users, like this screenshot.
XnViewMP Linux X64 - Debian - X64
jonha4711
Posts: 62
Joined: Mon Feb 08, 2016 4:35 pm

Re: Questions about Categories

Post by jonha4711 »

xnview wrote:
jonha4711 wrote: Well, this is probably slightly easier to understand but it's not nearly as powerful as a fully-fledged AND/OR/NOT capability. If you add a drop-down box *after* each condition linking it with the following condition (along the lines of what photoken wrote), I think the best would be to offer the following 4 choices:
1. AND
2. OR
3. AND NOT
4. OR NOT
These should be pretty self explanatory.
but it can become complicated for the user i think
For C1 AND C2 OR C3, is it ((C1 AND C2) OR C3) or (C1 AND (C2 OR C3))
First of all, sure this can get quite complicated... that is the whole point of having a powerful mechanism at your fingertips! OTOH, nobody is *forced* to construct very complex queries. Similarly, nobody is ever *forced* to use regular expressions in a textual search but they add a whole new level of capability.

Second, to the real question. There are two possibilities here: one is simply to define the operator precedence in a certain way and stick with that. (For instance in C, logical AND has a higher priority than logical OR, so "C1 && C2 || C3" would read as "((C1 && C2) || C3)".)

Second, one could add a mechanism for explicitly supporting parentheses to make the meaning clear. This would be the Rolls Royce version, but I am not sure whether the effort is worth it. Perhaps it would be worthwhile to "test the waters" with the simpler precedence version and only if and when users complain about the lack of parentheses with convincing use cases, think about adding them. Sort of lazy evaluation : )
User avatar
photoken
Posts: 19
Joined: Sun Mar 29, 2015 9:34 pm

Re: Questions about Categories

Post by photoken »

xnview wrote: but it can become complicated for the user i think
For C1 AND C2 OR C3, is it ((C1 AND C2) OR C3) or (C1 AND (C2 OR C3))
Yes, it can become complicated.

Since the end result is to create a SQL query against the database, I think there are two optional methods to use in the User Interface:
  • Do nothing in the UI to accommodate parentheses, and let the default behaviour of the database's interpretation happen.
  • Add small dropdown selection boxes to each line:
    • At the front of the line, the dropdown box would contain two items:
      • Nothing. (Empty)
      • Open parenthesis: (
    • At the end of the line, the dropdown box would contain two items:
      • Nothing. (Empty)
      • Close parenthesis: )
    The empty items would be the default.
This would eliminate the need for "AND NOT" and "OR NOT" items in the other selection dropdown box.
Ken
Yes, I think it can be eeeeeasily done...
Just take everything out on Highway 61.
User avatar
Sirio
Posts: 132
Joined: Tue Oct 13, 2015 3:22 pm

Re: Questions about Categories

Post by Sirio »

+1
The AND/OR/NOT option would be useful.
Sirio
samvise
Posts: 12
Joined: Fri Mar 11, 2016 1:50 pm

Re: Questions about Categories

Post by samvise »

photoken wrote: [*]Each line of criteria would be followed by a dropdown selection box containing three items that refer to the following line of criteria:
  • AND
  • OR
  • NOT
[/list]
+1! As a first step, this would already be great, even without parenthesis.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Questions about Categories

Post by xnview »

this solution is not easiest?
Image
Pierre.
User avatar
Sirio
Posts: 132
Joined: Tue Oct 13, 2015 3:22 pm

Re: Questions about Categories

Post by Sirio »

It would be more complete and precise like this:
Image
And with the possibility that the keyword in the category become visible instead of "Categories"
Attachments
AND-OR-NOT.jpg
Sirio
User avatar
photoken
Posts: 19
Joined: Sun Mar 29, 2015 9:34 pm

Re: Questions about Categories

Post by photoken »

Sirio wrote:And with the possibility that the keyword in the category become visible instead of "Categories"
+1,000 !
Ken
Yes, I think it can be eeeeeasily done...
Just take everything out on Highway 61.
User avatar
Sirio
Posts: 132
Joined: Tue Oct 13, 2015 3:22 pm

Re: Questions about Categories

Post by Sirio »

More logic if they stay before.
Attachments
AND-OR-NOT copy.jpg
Sirio
jonha4711
Posts: 62
Joined: Mon Feb 08, 2016 4:35 pm

Re: Questions about Categories

Post by jonha4711 »

xnview wrote:this solution is not easiest?
Image
Easy is good, powerful is better. See my posts further up re this suggestion...
curio
Posts: 5
Joined: Thu May 26, 2016 8:26 am

Re: Questions about Categories

Post by curio »

xnview wrote:
photoken wrote: XnViewMP is lacking one very important search feature, however -- the ability to search for images which do NOT have a specific category. In other words, you can build a search for images which have the categories "Germany" AND "Mountains", but you cannot build a search for images which have the category "Germany" and NOT "Mountains". I filed a request for this many months ago, but it has not been implemented. :(
yes, but how to do that in ui? by selecting category in the treeview, we can have AND/OR, but how to represent NOT
Very easily, e.g., the way Daminion does: In the tree, a radio box can be ticked for positive selection (turns green) and Ctrl-clicked (or was it Alt-clicked?) for negative selection (turns red). Also, once multiple entries are ticked on the same level of the hierarchy, a logical operation selector becomes availabe (inline with the next-higher tier) for selection between AND and OR. Being able to filter this way would be way less cumbersome than the pretty tedious procedure performed in the search dialog.
User avatar
Sirio
Posts: 132
Joined: Tue Oct 13, 2015 3:22 pm

Re: Questions about Categories

Post by Sirio »

Interesting, in fact, here the link to see it:
http://daminion.net/feature-tour/damini ... any-assets
Sirio
Post Reply