Query operators
Yuri D'Elia
wavexx at thregr.org
Mon Aug 29 03:29:03 PDT 2016
Hi everyone,
I'm a bit baffled by the query syntax. Reading the manual:
``Each term in the query will be implicitly connected by a logical AND
if no explicit operator is provided (except that terms with a common
prefix will be implicitly combined with OR).''
I would have assumed that:
term1 (tag:term2 tag:term3)
would be equivalent to:
term1 AND (tag:term2 AND tag:term3)
but if I read carefully (and by looking at the query results), since
tag: is a common prefix between term2 and term3, it is actually:
term1 AND (tag:term2 OR tag:term3)
am I right? Is this a feature of the xapian query syntax? (can it be
tweaked to _unconditionally_ AND all terms?)
For me, the idea that two terms can be ORed if the prefix is the same
can cause queries to return unexpected results.
What about:
term1 xterm2 xterm3 term2
Is this:
term1 AND (xterm2 OR xterm3) AND term2
or is it:
term1 OR xterm2 OR xterm3 OR term2
?
More information about the notmuch
mailing list