Thread subqueries

David Bremner david at tethera.net
Sat May 12 07:01:09 PDT 2018


Tomi Ollila <tomi.ollila at iki.fi> writes:
>
> question: how does these differ (processing-wise):
>
>          $ notmuch count  'thread:"date:1month..now tag:dkg"'

the thread field processor receives the string "date:1month..now tag:dkg"
(without the quotes) which it treats as a thread id, and doesn't match
anything

>          $ notmuch count  'thread:{date:1month..now tag:dkg}'

the t.f.p. receives the string "{date:1month..now"
(without quotes) because the top level query parser splits at spaces,
unless prevented by "". This it considers syntactically invalid, rather
than silently dropping the second term.

>          $ notmuch count 'thread:"{date:1month..now tag:dkg}"'

The t.f.p. receives the string "{date:1month..now tag:dkg}" (without
quotes). It notes the first and last character, and triggers a subquery
expansion.

The thing to keep in mind is that we have no control over the top level
"tokenization" by Xapian, except for using "".


More information about the notmuch mailing list