match on all messages in a thread - rather than messages invdividually

David Bremner david at tethera.net
Mon Aug 22 05:48:38 PDT 2016


Gaute Hope <eg at gaute.vetsj.com> writes:

> Is it possible to search in a way that (through the API) such that the
> thread is matching, rather than the individual messages?

This is not currently possible.  Since threads are not stored as
documents in the database, a straightforward implementation would be
linear in the number of threads.  It might be possible to filter the set
of threads to be examined by turning the "AND" query into an "OR" query,
and making a second pass at the thread-id's of messages matching the
expanded query. I'm not sure if/when I'll find time to look at it, but
if someone wants a project, I think most of the xapian pieces are in

    id:1467034387-16885-1-git-send-email-david at tethera.net

> How does muted thread work with regard to this? If I have one unmuted
> message in a thread that message matches the query. If a new message is
> added to a muted thread, is the muted tag applied to it?

"muted" is not something built in to notmuch, so it depends a bit which
hack you're refering to. If you mean the CLI hack described at

     https://notmuchmail.org/excluding/

then yes, the muted tag is propagated. 


More information about the notmuch mailing list