From: Jani Nikula <jani@nikula.org>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH] doc: add details about Xapian search syntax
Date: Sun, 18 Jan 2015 12:29:43 +0200 [thread overview]
Message-ID: <87h9vojsa0.fsf@nikula.org> (raw)
In-Reply-To: <1421573635-9427-1-git-send-email-david@tethera.net>
On Sun, 18 Jan 2015, David Bremner <david@tethera.net> 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
next prev parent reply other threads:[~2015-01-18 10:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-18 9:33 [PATCH] doc: add details about Xapian search syntax David Bremner
2015-01-18 10:29 ` Jani Nikula [this message]
2015-01-18 12:59 ` [PATCH 1/3] " David Bremner
2015-01-18 12:59 ` [PATCH 2/3] doc: add material on stemming and wildcards David Bremner
2015-02-23 18:18 ` Jani Nikula
2015-01-18 12:59 ` [PATCH 3/3] doc: add more information on operators David Bremner
2015-02-23 18:23 ` Jani Nikula
2015-01-25 17:58 ` [PATCH 1/3] doc: add details about Xapian search syntax David Bremner
2015-02-23 20:05 ` David Bremner
2015-02-23 20:05 ` [Patch v2 1/4] doc: add material on stemming and wildcards David Bremner
2015-02-23 20:05 ` [Patch v2 2/4] doc: add more information on operators David Bremner
2015-02-23 20:13 ` W. Trevor King
2015-02-23 20:05 ` [Patch v2 3/4] doc: typo fix for prefix discussion David Bremner
2015-02-23 20:05 ` [Patch v2 4/4] doc: update list of prefixes David Bremner
2015-02-24 7:32 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h9vojsa0.fsf@nikula.org \
--to=jani@nikula.org \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).