[Wasabi Proposal] End user search language
jean-francois.dockes at wanadoo.fr
Tue Jan 30 00:46:45 PST 2007
Mikkel Kamstrup Erlandsen writes:
> Thinking more about this operator precedence issue... What about
> || type:music jimi hendrix or beatles
> If OR had precedence over AND that search would not yield the expected
Yes, but this is actually a phrase search which should be expressed as
type:music "jimi hendrix" or beatles
> A totally other approach would be to have AND take precedence and use "," to
> separate expressions that should be ANDed together. Example:
> || type:music, jimi hendrix or beatles
> || type:music, jimi hendrix or beatles, filetype:mp3 or filetype:ogg
> The last example translates to: (type:music) AND ((jimi AND hendrix) OR
> beatles) AND (filetype:mp3 OR filetype:ogg)
> I actually kinda like that. It keeps the conventional AND precedence and
> allows simple grouping of expressions.
If we are going to have any kind of explicit grouping let's use the
universal standard for this: bracketing with parenthesis.
> > In our case, I think that you are right and that it makes more sense to
> > have OR take precedence, this has my vote.
> Are you still of the same opinion?
Yes for a simple reason: the natural way that the OR thing gets into
searching is through synonyms. That is, you are searching for
[beatles AND live] and get to thinking about expanding to
[(beatles OR lennon) AND (live OR unplugged)].
This is very common and made easier if OR has precedence.
But the decision will always be a split one, there are reasons on each
side, you just have to decide something.
More information about the xdg