diff options
author | David Bremner <david@tethera.net> | 2019-03-18 21:39:21 -0300 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2019-04-17 08:48:16 -0300 |
commit | 319dd95ebbd841320e269d34e67a824876f8426a (patch) | |
tree | 3f57795432d7a2d6573e77cab3e9176a507098d0 /doc | |
parent | 9fbc5cb578c60762ab9c2a24a14d4d07de516790 (diff) |
lib: add 'body:' field, stop indexing headers twice.
The new `body:` field (in Xapian terms) or prefix (in slightly
sloppier notmuch) terms allows matching terms that occur only in the
body.
Unprefixed query terms should continue to match anywhere (header or
body) in the message.
This follows a suggestion of Olly Betts to use the facility (since
Xapian 1.0.4) to add the same field with multiple prefixes. The double
indexing of previous versions is thus replaced with a query time
expension of unprefixed query terms to the various prefixed
equivalent.
Reindexing will be needed for 'body:' searches to work correctly;
otherwise they will also match messages where the term occur in
headers (demonstrated by the new tests in T530-upgrade.sh)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man7/notmuch-search-terms.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst index f7a39ceb..fd8bf634 100644 --- a/doc/man7/notmuch-search-terms.rst +++ b/doc/man7/notmuch-search-terms.rst @@ -44,6 +44,9 @@ results to those whose value matches a regular expression (see notmuch search 'from:"/bob@.*[.]example[.]com/"' +body:<word-or-quoted-phrase> + Match terms in the body of messages. + from:<name-or-address> or from:/<regex>/ The **from:** prefix is used to match the name or address of the sender of an email message. @@ -249,7 +252,7 @@ follows. Boolean **tag:**, **id:**, **thread:**, **folder:**, **path:**, **property:** Probabilistic - **to:**, **attachment:**, **mimetype:** + **body:**, **to:**, **attachment:**, **mimetype:** Special **from:**, **query:**, **subject:** |