can a notmuch query filter the output based on the size of a thread?

David Bremner david at tethera.net
Sat Nov 16 07:38:44 PST 2019


Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:

> nope, i think they want:
>
>    - show me all threads where:
>       - at least one message has the tag 'list/questions', and
>       - at least two distinct messages are present
>
> does that make more sense?
>

I don't see an easy way to do this without adding machinery like for the
"thread:{}" queries. This comes with a definite performance hit as it
reads the whole thread during the query construction. Currently notmuch
does not store a mapping from threads to messages in the database, but
only from messages to threads.

Alternatively someone (TM) could add thread objects to the notmuch
database. This would allow much faster thread operations, but would
require some fairly delicate maintenance of the thread
objects. Basically they would need to updated every time a message is
added or removed from the database, and potentially garbage collected.



More information about the notmuch mailing list