[PATCH] TODO: date range queries - check

Tomi Ollila tomi.ollila at iki.fi
Sat Dec 8 17:53:36 PST 2012


On Sun, Dec 09 2012, Jani Nikula <jani at nikula.org> wrote:

> On Sat, 08 Dec 2012, Jameson Graef Rollins <jrollins at finestructure.net> wrote:
>> On Sat, Dec 08 2012, David Bremner <david at tethera.net> wrote:
>>> Patch? Concrete wording suggestion?
>>
>> How about:
>>
>> It would be nice to not require both endpoints to be specified in date
>> searches.  For example it would be nice to be able to say things like
>> "date:2009-01-1", to specify a search over a particular day, or
>> "since:'1 month' to specify an open-ended range, and have the other
>> endpoint be implicit.  To do any of this we're probably going to need to
>> break down an write our own parser for the query string rather than
>> using Xapian's QueryParser class.
>
> FWIW, this means, in practice:
>
> Make date:<expr> an alias for date:<expr>..<expr>
>
> Make since:<expr> an alias for date:<expr>..
>
> Make until:<expr> an alias for date:..<expr>


I personally don't desire since: and until: prefixes (and as not being
native english speaker maybe more so)

I'd like to also drop the 'date:' part (just for convenience, nothing
against using english word there ;) and use only e.g. 1d..  (and so on).


Actually I am (still) running my hacky wrapper which converts strings
like '1d..' found in command line to '<seconds-since-epoc>..' before passing
the command line to notmuch. I find it very convenient...

e.g. IMHO ..yesterday would be more convenient than since:yesterday

>
> We'll either need to write our own query parser or some new features to
> upstream Xapian to do any of these.

> BR,
> Jani.


FWIW

Tomi


More information about the notmuch mailing list