]> git.notmuchmail.org Git - notmuch/commitdiff
lib: Index name and address of from/to headers as a phrase
authorAustin Clements <amdragon@MIT.EDU>
Mon, 16 Jun 2014 02:40:32 +0000 (22:40 -0400)
committerDavid Bremner <david@tethera.net>
Wed, 18 Jun 2014 20:55:14 +0000 (17:55 -0300)
Previously, we indexed the name and address parts of from/to headers
with two calls to _notmuch_message_gen_terms.  In general, this
indicates that these parts are separate phrases.  However, because of
an implementation quirk, the two calls to _notmuch_message_gen_terms
generated adjacent term positions for the prefixed terms, which
happens to be the right thing to do in this case, but the wrong thing
to do for all other calls.  Furthermore, _notmuch_message_gen_terms
produced potentially overlapping term positions for the un-prefixed
copies of the terms, which is simply wrong.

This change indexes both the name and address in a single call to
_notmuch_message_gen_terms, indicating that they should be part of a
single phrase.  This masks the problem with the un-prefixed terms
(fixing the two known-broken tests) and puts us in a position to fix
the unintentionally phrases generated by other calls to
_notmuch_message_gen_terms.


No differences found