2007/2/13, Calum Benson <[EMAIL PROTECTED]>:

On Mon, 2007-01-29 at 12:51 +0100, Mikkel Kamstrup Erlandsen wrote:
> 2007/1/29, Jean-Francois Dockes <[EMAIL PROTECTED]>:
>         Mikkel Kamstrup Erlandsen writes:
>         > Hi All,
>         >
>         > I put together a first take on formalizing an end user
>         search language.
>         >
>         > http://wiki.freedesktop.org/wiki/WasabiUserSearchLanguage
>
>         - Which of OR and AND has priority ? (does (A AND B OR C) mean
>            ((A AND B) OR C) or (A AND (B OR C)) ?
>
> I guess it is standard that AND takes precedence over OR, but maybe it
> makes sense to reverse that in our case.

This is a perennial problem with designing boolean query UIs for average
(i.e. non-mathematically-trained) users-- they expect "and", "or" and
"not" to mean the same as they do in everyday language, but often they
don't.  E.g.:

-  User asks for a list of "blue things and red things", and gets back a
list of things that are both blue AND red (which in many contexts is an
empty list).

- User asks for a list of things that are "not blue or green", and gets
back a list of things that are every colour except blue (including
green).

FWIW, this is why I personally prefer something like the eBay search
"language" to Google's-- I always find it easier to remember how to
construct more complex queries, and they never involve typing "and" or
"or" :)  (But of course, I'm not really your "average user" either.)



I was not familiar with the eBay search language. I must say that I'm not
really thrilled at they way they use braces - ie. they are not
subexpressions. Also - you have to read the language spec to know what they
do.

Also, I must say that I've got cold feet with regards to let OR have
precedence over AND. Is it not safe to assume that people that use logical
operators (which I'm willing to bet is a minority) knows that AND usually
takes precedence over OR?

An alternative could be to let whitespace be a SAND="Strong AND" that takes
precedence over normal AND. That way your "blue things and red things" would
find the expected. This may have unwanted consequences though, I haven't
really thought it through.

Cheers,
Mikkel
_______________________________________________
xdg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xdg

Reply via email to