how to search for hyphenated words? (was: how to search for Morse code?)
marmstrong at google.com
Mon Mar 11 17:05:08 PDT 2019
Carl Worth <cworth at 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",
"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 at whitehouse.gov)."
I assume that this particular Xapian feature is unavailable in notmuch?
If so, I wonder if enabling has ever been considered?
Being able to "drop down" to do things like exact phrase matches is one
reason why I use notmuch, because the precision sometimes matters. I
currently do this by fetching the mail message itself and using
old-school mail processing tools on the message file.
More information about the notmuch