X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=doc%2Fman7%2Fnotmuch-search-terms.rst;h=47cab48d3ee97df0d9db80028a586c40fd1a3b2f;hb=55524bb063c95ae51a1762eb0b1aacce6ca49223;hp=adedf5a3a2d25375c58ecbc960b987d8ccc94f44;hpb=bbf6069252d31e6693ee99cce8bf4f9fab47e360;p=notmuch diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst index adedf5a3..47cab48d 100644 --- a/doc/man7/notmuch-search-terms.rst +++ b/doc/man7/notmuch-search-terms.rst @@ -34,10 +34,14 @@ indicate user-supplied values): - from: +- from:// + - to: - subject: +- subject:// + - attachment: - mimetype: @@ -56,6 +60,10 @@ indicate user-supplied values): - lastmod:.. +- query: + +- property:= + The **from:** prefix is used to match the name or address of the sender of an email message. @@ -67,6 +75,15 @@ subject of an email. Searching for a phrase in the subject is supported by including quotation marks around the phrase, immediately following **subject:**. +If notmuch is built with **Xapian Field Processors** (see below) the +**from:** and **subject** prefix can be also used to restrict the +results to those whose from/subject value matches a regular expression +(see **regex(7)**) delimited with //. + +:: + + notmuch search 'from:/bob@.*[.]example[.]com/' + The **attachment:** prefix can be used to search for specific filenames (or extensions) of attachments to email messages. @@ -132,6 +149,16 @@ were added/removed or filenames changed). This is usually used in conjunction with the **--uuid** argument to **notmuch search** to find messages that have changed since an earlier query. +The **query:** prefix allows queries to refer to previously saved +queries added with **notmuch-config(1)**. Named queries are only +available if notmuch is built with **Xapian Field Processors** (see +below). + +The **property:** prefix searches for messages with a particular += property pair. Properties are used internally by notmuch +(and extensions) to add metadata to messages. A given key can be +present on a given message with several different values. + Operators --------- @@ -206,17 +233,18 @@ Boolean and Probabilistic Prefixes ---------------------------------- Xapian (and hence notmuch) prefixes are either **boolean**, supporting -exact matches like "tag:inbox" or **probabilistic**, supporting a more flexible **term** based searching. The prefixes currently supported by notmuch are as follows. - -+------------------+-----------------------+ -|Boolean |Probabilistic | -+------------------+-----------------------+ -| **tag:** **id:** | **from:** **to:** | -|**thread:** |**subject:** | -|**folder:** |**attachment:** | -|**path:** |**mimetype:** | -| | | -+------------------+-----------------------+ +exact matches like "tag:inbox" or **probabilistic**, supporting a more +flexible **term** based searching. Certain **special** prefixes are +processed by notmuch in a way not stricly fitting either of Xapian's +built in styles. The prefixes currently supported by notmuch are as +follows. + +Boolean + **tag:**, **id:**, **thread:**, **folder:**, **path:**, **property:** +Probabilistic + **to:**, **attachment:**, **mimetype:** +Special + **from:**, **query:**, **subject:** Terms and phrases ----------------- @@ -385,6 +413,8 @@ notmuch was built against a sufficiently recent version of Xapian by running Currently the following features require field processor support: - non-range date queries, e.g. "date:today" +- named queries e.g. "query:my_special_query" +- regular expression searches, e.g. "subject:/^\\[SPAM\\]/" SEE ALSO ========