Date ranges syntax (was: Xapian locking errors with custom query parser)
Michal Sojka
sojkam1 at fel.cvut.cz
Thu Mar 24 06:50:21 PDT 2011
On Mon, 21 Mar 2011, Austin Clements wrote:
> On Fri, Mar 11, 2011 at 3:58 AM, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:
> > Additionally, I'd suggest to support value range queries for dates with
> > ".." syntax. Besides that some users may relay on this syntax, I use
> > date searches a lot and with custom query parser I have to type
> > "after:yesterday", which is unnecessarily long. I wish that
> > "yesterday..", which is much easier to type, would do the same.
> > Similarly, "mon..wed" would be easier to type than "after:mon
> > before:wed". What do you think?
>
> Personally, I just don't understand the .. range syntax, which is why
> I left it out (also, I was following the example in the TODO file).
> It's completely inconsistent with the rest of the query syntax and
> makes no indication of what it's a range over (what if you had other
> ordinal values to search over? what if you could search by the
> received date or the sent date?).
>
> What about something like "date:mon..wed"? That's consistent with the
> query syntax (the range part becomes part of the date syntax, not part
> of the top-level query syntax), it indicates the domain of the search
> term in a clean and extensible way, and it's succinct.
Yes, the date prefix with ranges in value sounds reasonable and the word
"date" is even shorter than "after" or "before".
-Michal
More information about the notmuch
mailing list