[PATCH] WIP: regexp matching in 'subject' and 'from'

David Bremner david at tethera.net
Fri Jun 10 04:09:36 PDT 2016


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

>
> Cool!
>
> Would it break a lot of things if you just replace the original prefix?

It would change the matching behaviour. I guess there are people that
like the current "sloppy" matching of from: and subject:.  In my
not-very-scientific tests, it is a factor of 5 to 10 times slower to do
regexp search, which makes sense because it is effectively post
processing the results from Xapian. At least on my system it seems fast
enough to be usable interactively, but that is a pretty shocking
performance regression. And I know there are people with more mail on
slower systems.

> Could it be made to work on the message body?

See Austin's previous reply for the details, but basically no; these
"values" index in terms of whole strings, while the body is indexed by
terms (roughly, words). In principle we could add a value slot for the
body, but I think that would at least double the size of the database
(maybe more).


More information about the notmuch mailing list