David Bremner <da...@tethera.net> writes:

> +    if (str.size () == 0)
> +     return Xapian::Query(Xapian::Query::OP_AND_NOT,
> +                          Xapian::Query::MatchAll,
> +                          Xapian::Query (Xapian::Query::OP_WILDCARD, 
> term_prefix));
> +

Full disclosure, this is a pretty expensive query. On an older i7, it
takes about 7.5s (elapsed) on my 466k messages to find 702 messages
without a subject.  I don't think it's a big deal, since I don't think

     notmuch search 'subject:""'

is likely to be typed by mistake.

For comparison, "grep -R '^Subject:$'" (which is not exactly the same
query,  since some messages completely lack a Subject: line).
takes about 390s (elapsed).
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to