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