[PATCH] doc: add details about Xapian search syntax
authorDavid Bremner <david@tethera.net>
Sun, 18 Jan 2015 09:33:55 +0000 (10:33 +0100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:47:31 +0000 (14:47 -0700)
61/aca387f6e4fe67504b06e843ef9ea9ea686c3b [new file with mode: 0644]

diff --git a/61/aca387f6e4fe67504b06e843ef9ea9ea686c3b b/61/aca387f6e4fe67504b06e843ef9ea9ea686c3b
new file mode 100644 (file)
index 0000000..28b24e6
--- /dev/null
@@ -0,0 +1,112 @@
+Return-Path: <bremner@tesseract.cs.unb.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 0E38F431FC7\r
+       for <notmuch@notmuchmail.org>; Sun, 18 Jan 2015 01:34:10 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 2.438\r
+X-Spam-Level: **\r
+X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
+       tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id hyn3bYo6oF98 for <notmuch@notmuchmail.org>;\r
+       Sun, 18 Jan 2015 01:34:07 -0800 (PST)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 2B649431FAF\r
+       for <notmuch@notmuchmail.org>; Sun, 18 Jan 2015 01:34:07 -0800 (PST)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+       (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+       id 1YCmFC-0005FN-Nc; Sun, 18 Jan 2015 05:34:06 -0400\r
+Received: (nullmailer pid 9469 invoked by uid 1000); Sun, 18 Jan 2015\r
+       09:34:01 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] doc: add details about Xapian search syntax\r
+Date: Sun, 18 Jan 2015 10:33:55 +0100\r
+Message-Id: <1421573635-9427-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.1.4\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 18 Jan 2015 09:34:10 -0000\r
+\r
+Questions related to the way that probabilistic prefixes and phrases\r
+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
+---\r
+ doc/man7/notmuch-search-terms.rst | 46 +++++++++++++++++++++++++++++++++++++++\r
+ 1 file changed, 46 insertions(+)\r
+\r
+diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst\r
+index 1acdaa0..5c65938 100644\r
+--- a/doc/man7/notmuch-search-terms.rst\r
++++ b/doc/man7/notmuch-search-terms.rst\r
+@@ -129,6 +129,52 @@ operators, but will have to be protected from interpretation by the\r
+ shell, (such as by putting quotation marks around any parenthesized\r
+ expression).\r
\r
++Boolean and Probabilistic Prefixes\r
++----------------------------------\r
++\r
++Xapian (and hence notmuch) prefixes are either **boolean**, supporting\r
++exact matches like "tag:inbox"  or **probabilistic**, supporting a most flexible **term** based searching. The pre\r
++\r
+++------------------+-----------------------+\r
++|Boolean           |Probabilistic          |\r
+++------------------+-----------------------+\r
++| **tag:** **id:** | **from:** **to:**     |\r
++|**thread:**       |**subject:**           |\r
++|**folder:**       |**attachment**         |\r
++|**path:**         |                       |\r
++|                  |                       |\r
+++------------------+-----------------------+\r
++\r
++Terms and phrases\r
++-----------------\r
++\r
++In general Xapian distinguishes between lists of terms and\r
++**phrases**. Phrases are indicated by double quotes (but beware you\r
++probably need to protect those from your shell) and insist that those\r
++unstemmed words occur in that order. One useful, but initially\r
++surprising feature is that the following are equivalant ways to write\r
++the same phrase.\r
++\r
++- "a list of words"\r
++- a-list-of-words\r
++- a/list/of/words\r
++- a.list.of.words\r
++\r
++Both parenthesised lists of terms and quoted phrases are ok with\r
++probabilisitic prefixes such as **to:**, **from:**, and **subject:**. In particular\r
++\r
++   subject:(pizza free)\r
++\r
++is equivalent to\r
++\r
++   subject:pizza and subject:free\r
++\r
++Both of these will match a subject "Free Delicious Pizza" while\r
++\r
++   subject:"pizza free"\r
++\r
++will not.\r
++\r
+ DATE AND TIME SEARCH\r
+ ====================\r
\r
+-- \r
+2.1.4\r
+\r