From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D3D04431FB6 for ; Sun, 18 Jan 2015 02:29:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.738 X-Spam-Level: * X-Spam-Status: No, score=1.738 tagged_above=-999 required=5 tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_LOW=-0.7] 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 kAKbbpv3ee0S for ; Sun, 18 Jan 2015 02:29:33 -0800 (PST) Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 12394431FAF for ; Sun, 18 Jan 2015 02:29:33 -0800 (PST) Received: by mail-we0-f170.google.com with SMTP id x3so348487wes.1 for ; Sun, 18 Jan 2015 02:29:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type; bh=fJPuZ6dR9cMnbK8DJ5OeuaIgXeHpHJTs07ikcUcocLU=; b=d/zgZSmVcC/dHIbJd8FWB5MD+qw8X4TgYDmRYXGpODXT9ieZRES4Ztb60/ZsEWWvts uiP3uhWbLKMweE4wqoFE/bW5/4PayZPfl2OZDB16zEO+fNa0yNfDp1CxefRjaKoCgc6G n3eQRrdbxc1FmQRu3vXDOYiTdU7rWxnekgC0/sze1N6WwPnwFOdH5guWYKXMWJtJeI0S pfNCL1CaOuOf9TBwrVAZTiCF3xTlJLi7LlOmql4lH/oohfjSRBJkYVkNJ3egPWUrEXPV Vi/L8NWOgWTFe9WYINa+VDjOp6HJzOAtcIuqdafdlnIAFBbK/ojLBSRICZMUifhKsdt8 /GnQ== X-Gm-Message-State: ALoCoQmxkW/i0L0PjflMrV6soF04A/uXIKrpTJC5hIKGucn8xz5dU2EsbwSTR7bah0JVTm9vgjgP X-Received: by 10.194.201.137 with SMTP id ka9mr48566903wjc.66.1421576971791; Sun, 18 Jan 2015 02:29:31 -0800 (PST) Received: from localhost (mobile-internet-bcee14-89.dhcp.inet.fi. [188.238.20.89]) by mx.google.com with ESMTPSA id ez1sm12873737wjd.31.2015.01.18.02.29.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Jan 2015 02:29:31 -0800 (PST) From: Jani Nikula To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] doc: add details about Xapian search syntax In-Reply-To: <1421573635-9427-1-git-send-email-david@tethera.net> References: <1421573635-9427-1-git-send-email-david@tethera.net> User-Agent: Notmuch/0.19+19~g9060a1f (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Sun, 18 Jan 2015 12:29:43 +0200 Message-ID: <87h9vojsa0.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain 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 10:29:37 -0000 On Sun, 18 Jan 2015, David Bremner wrote: > 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. I think this is a good idea. > --- > 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 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. > + While at it, I think it would be useful to incorporate relevant parts of http://notmuchmail.org/searching/ into the man page. BR, Jani. > DATE AND TIME SEARCH > ==================== > > -- > 2.1.4 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch