Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / ea / b03c3f83bf0faa404a08981a1d226505d5cdfb
1 Return-Path: <bremner@tesseract.cs.unb.ca>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id AA67A431FC7\r
6         for <notmuch@notmuchmail.org>; Sun, 18 Jan 2015 05:39:21 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 2.438\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
12         tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id b2mbMEhitgoQ for <notmuch@notmuchmail.org>;\r
16         Sun, 18 Jan 2015 05:39:20 -0800 (PST)\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
18         [87.98.215.224])\r
19         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 47569431FC4\r
22         for <notmuch@notmuchmail.org>; Sun, 18 Jan 2015 05:39:20 -0800 (PST)\r
23 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
24         4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)\r
25         id 1YCpSH-0006ai-L8; Sun, 18 Jan 2015 12:59:49 +0000\r
26 Received: (nullmailer pid 29991 invoked by uid 1000); Sun, 18 Jan 2015\r
27         12:59:36 -0000\r
28 From: David Bremner <david@tethera.net>\r
29 To: Jani Nikula <jani@nikula.org>, David Bremner <david@tethera.net>,\r
30         notmuch@notmuchmail.org\r
31 Subject: [PATCH 1/3] doc: add details about Xapian search syntax\r
32 Date: Sun, 18 Jan 2015 13:59:29 +0100\r
33 Message-Id: <1421585971-29949-1-git-send-email-david@tethera.net>\r
34 X-Mailer: git-send-email 2.1.4\r
35 In-Reply-To: <87h9vojsa0.fsf@nikula.org>\r
36 References: <87h9vojsa0.fsf@nikula.org>\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Sun, 18 Jan 2015 13:39:22 -0000\r
50 \r
51 Questions related to the way that probabilistic prefixes and phrases\r
52 are handled come up quite often and it is nicer to have the documentation self contained.  Hopefully putting it in subsections prevents it from being overwhelming.\r
53 ---\r
54  doc/man7/notmuch-search-terms.rst | 52 +++++++++++++++++++++++++++++++++++++++\r
55  1 file changed, 52 insertions(+)\r
56 \r
57 diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst\r
58 index 1acdaa0..52f6804 100644\r
59 --- a/doc/man7/notmuch-search-terms.rst\r
60 +++ b/doc/man7/notmuch-search-terms.rst\r
61 @@ -129,6 +129,58 @@ operators, but will have to be protected from interpretation by the\r
62  shell, (such as by putting quotation marks around any parenthesized\r
63  expression).\r
64  \r
65 +Boolean and Probabilistic Prefixes\r
66 +----------------------------------\r
67 +\r
68 +Xapian (and hence notmuch) prefixes are either **boolean**, supporting\r
69 +exact matches like "tag:inbox"  or **probabilistic**, supporting a most flexible **term** based searching. The prefixes currently supported by notmuch are as follows.\r
70 +\r
71 ++------------------+-----------------------+\r
72 +|Boolean           |Probabilistic          |\r
73 ++------------------+-----------------------+\r
74 +| **tag:** **id:** | **from:** **to:**     |\r
75 +|**thread:**       |**subject:**           |\r
76 +|**folder:**       |**attachment**         |\r
77 +|**path:**         |                       |\r
78 +|                  |                       |\r
79 ++------------------+-----------------------+\r
80 +\r
81 +Terms and phrases\r
82 +-----------------\r
83 +\r
84 +In general Xapian distinguishes between lists of terms and\r
85 +**phrases**. Phrases are indicated by double quotes (but beware you\r
86 +probably need to protect those from your shell) and insist that those\r
87 +unstemmed words occur in that order. One useful, but initially\r
88 +surprising feature is that the following are equivalant ways to write\r
89 +the same phrase.\r
90 +\r
91 +- "a list of words"\r
92 +- a-list-of-words\r
93 +- a/list/of/words\r
94 +- a.list.of.words\r
95 +\r
96 +Both parenthesised lists of terms and quoted phrases are ok with\r
97 +probabilisitic prefixes such as **to:**, **from:**, and **subject:**. In particular\r
98 +\r
99 +::\r
100 +\r
101 +   subject:(pizza free)\r
102 +\r
103 +is equivalent to\r
104 +\r
105 +::\r
106 +\r
107 +   subject:pizza and subject:free\r
108 +\r
109 +Both of these will match a subject "Free Delicious Pizza" while\r
110 +\r
111 +::\r
112 +\r
113 +   subject:"pizza free"\r
114 +\r
115 +will not.\r
116 +\r
117  DATE AND TIME SEARCH\r
118  ====================\r
119  \r
120 -- \r
121 2.1.4\r
122 \r