Apparently, terms with a common prefix are *not* connected by implicit "OR"

David Bremner david at
Sun Aug 11 16:08:58 PDT 2019

jorge+list at (Jorge P. de Morais Neto) writes:

> Hi.  The NOTMUCH-SEARCH-TERMS man page says:
>     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).
> However, in practice I get different results:
>     $ notmuch count '( OR to:jorge+cp+concurso at'
>     66
>     $ notmuch count '( to:jorge+cp+concurso at'
>     0

Thanks for the report. As a test, can you try with

     $ notmuch count '( to:"jorge+cp+concurso at")'

I suspect that will work around the problem, which I believe is related
to the way that notmuch uses the xapian parser (in order to provide
regexp matching for some prefixes). In particular, if I try that with
NOTMUCH_DEBUG_QUERY=yes in the environment I can see the implicit OR.


More information about the notmuch mailing list