Re: how to search for hyphenated words? (was: how to search for Morse code?)

Subject: Re: how to search for hyphenated words? (was: how to search for Morse code?)

Date: Mon, 11 Mar 2019 22:13:20 -0300

To: Matt Armstrong, Carl Worth, Gregor Zattler, notmuch@notmuchmail.org

Cc:

From: David Bremner


Matt Armstrong <marmstrong@google.com> writes:

> Carl Worth <cworth@cworth.org> writes:
>
>> Hi Gregor,
>>
>> The trick here is that when notmuch is indexing body text it feeds it
>> into a Xapian function that parses the text by finding "terms" in the
>> text. And this parser considers both punctuation and whitespace as
>> separators between terms.
>
> I notice that Xapian supports something called "phrase searches",
> documented as:
>
>   "A phrase surrounded with double quotes ("") matches documents
>   containing that exact phrase. Hyphenated words are also treated as
>   phrases, as are cases such as filenames and email addresses
>   (e.g. /etc/passwd or president@whitehouse.gov)."
>
> I assume that this particular Xapian feature is unavailable in notmuch?
> If so, I wonder if enabling has ever been considered?

It is enabled, and documented in notmuch-search-terms(7). Unfortunately
I don't think it's related to the original request. The mention of
hyphenated words is about the input to the query parser, not the
(necessarily) the retrieved text.

d

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: