aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/T080-search.sh
Commit message (Collapse)AuthorAge
* lib: Separate all phrases indexed by _notmuch_message_gen_termsGravatar Austin Clements2014-06-18
| | | | | | | | | | | | This adds a 100 termpos gap between all phrases indexed by _notmuch_message_gen_terms. This fixes a bug where terms from the end of one header and the beginning of another header could match together in a single phrase and a separate bug where term positions of un-prefixed terms overlapped. This fix only affects newly indexed messages. Messages that are already indexed won't benefit from this fix without re-indexing, but the fix won't make things any worse for existing messages.
* test: Known-broken test for overlapping/adjacent termposGravatar Austin Clements2014-06-18
| | | | | | | | This adds two known-broken tests and one working test related to the term positions assigned to terms from different headers or MIME parts. The first test fails because we don't create a termpos gap between different headers. The second test fails because we don't adjust termpos at all when indexing multiple parts.
* lib: Index name and address of from/to headers as a phraseGravatar Austin Clements2014-06-18
| | | | | | | | | | | | | | | | | | | 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.
* test: Add search tests for combined name/address queriesGravatar Austin Clements2014-06-18
| | | | | | | | Two of these are currently known-broken. We index the name and address parts in two separate calls to _notmuch_message_gen_terms. Currently this has the effect of placing the term positions of the prefixed terms from the second call right after those of the first call, but screws up the term positions of the non-prefixed terms.
* test: Fix from/to search test queriesGravatar Austin Clements2014-06-18
| | | | | | Two of the search tests for "from" and "to" queries were clearly trying to search for prefixed phrases, but forgot to shell quote the phrases. Fix this by quoting them correctly.
* test: renamed test scripts to format T\d\d\d-name.shGravatar Tomi Ollila2014-01-13
All test scripts to be executed are now named as T\d\d\d-name.sh, numers in increments of 10. This eases adding new tests and developers to see which are test scripts that are executed by test suite and in which order.