X-Git-Url: https://git.cworth.org/git?p=notmuch-wiki;a=blobdiff_plain;f=searching.mdwn;h=8f2b07a141c5f4c6f91a4fb158be08e750dbe7b0;hp=b250b5703d9f82993c009ac5d7dab53f837ac3ae;hb=HEAD;hpb=e3bf75ddbc2d1534943caff69279fa15c0f28a0b diff --git a/searching.mdwn b/searching.mdwn index b250b57..0564f72 100644 --- a/searching.mdwn +++ b/searching.mdwn @@ -1,15 +1,19 @@ -# Searching with notmuch +[[!img notmuch-logo.png alt="Notmuch logo" class="left"]] +# Searching with Notmuch What good is an advanced indexing mail client if we don't know how to use it to actually find e-mail? -As notmuch is using Xapian -[this page](http://xapian.org/docs/queryparser.html) is a good start. -However, the description is generic (applies to Xapian in general) and -its intended audience seems to be developers wanting to use Xapian in -their applications. This page attempts to explain it to users of notmuch (who -may not be familiar with Xapian). 'notmuch help search-terms' also has a few -pointers. +The [notmuch-search-terms manual +pages](https://notmuchmail.org/doc/latest/man7/notmuch-search-terms.html) +should cover everything in a fairly concise manner. Please refer to +that for any details. + +Notmuch uses the [Xapian](http://xapian.org/) search engine. The [Xapian +QueryParser](http://xapian.org/docs/queryparser.html) documentation has +a generic description of the search language. The intended audience is +developers wanting to use Xapian in their applications; this page +attempts to explain it to users of Notmuch. ## Stemming @@ -164,14 +168,11 @@ Since notmuch is about (large) e-mail collections it is very useful to be able to search for e-mails within a specific date range. This will work: - notmuch search .. - -However, until a better syntax is implemented the only form accepted for -timestamps is Unix time (seconds since 1970-01-01 00:00:00 UTC), so the -utility 'date' can help: - - notmuch search $(date +%s -d 2009-10-01)..$(date +%s) + notmuch search date:.. -Explanation: '+%s' will tell date to output Unix time format and -d will -tell date to output the date from 2009-10-01. See date(1) for more -details. +For `` and ``, notmuch understands a variety of standard +and natural ways of expressing dates and times, both in absolute terms +("2012-10-24") and in relative terms ("yesterday"). Please refer to +the [notmuch-search-terms +manual](https://notmuchmail.org/doc/latest/man7/notmuch-search-terms.html) +for details.