unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Query operators
@ 2016-08-29 10:29 Yuri D'Elia
  2016-08-29 11:31 ` Charlie Allom
  2016-08-29 13:33 ` David Bremner
  0 siblings, 2 replies; 6+ messages in thread
From: Yuri D'Elia @ 2016-08-29 10:29 UTC (permalink / raw)
  To: notmuch

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

?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-29 20:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-29 10:29 Query operators Yuri D'Elia
2016-08-29 11:31 ` Charlie Allom
2016-08-29 12:38   ` Yuri D'Elia
2016-08-29 13:33 ` David Bremner
2016-08-29 15:01   ` Yuri D'Elia
2016-08-29 20:05     ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).