Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A5ED2431FAF for ; Thu, 13 Sep 2012 04:32:27 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 B5skvmycRgoL for ; Thu, 13 Sep 2012 04:32:25 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 9F16B431FAE for ; Thu, 13 Sep 2012 04:32:25 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 12FB010036F; Thu, 13 Sep 2012 14:32:31 +0300 (EEST) From: Tomi Ollila To: Michal Nazarewicz , Jani Nikula , notmuch@notmuchmail.org, David Bremner Subject: Re: [PATCH v3 6/9] lib: add date range query support In-Reply-To: References: <532340d05ea748518c021048900bb83149e04e88.1347484177.git.jani@nikula.org> User-Agent: Notmuch/0.13.2+162~ged38330 (http://notmuchmail.org) Emacs/24.2.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Thu, 13 Sep 2012 11:32:27 -0000 On Thu, Sep 13 2012, Michal Nazarewicz wrote: > On Wed, Sep 12 2012, Jani Nikula wrote: >> Add a custom value range processor to enable date and time searches of >> the form date:since..until, where "since" and "until" are expressions >> understood by the previously added date/time parser, to restrict the >> results to messages within a particular time range (based on the Date: >> header). >> >> If "since" or "until" describes date/time at an accuracy of days or >> less, the values are rounded according to the accuracy, towards past >> for "since" and towards future for "until". For example, >> date:november..yesterday would match from the beginning of November >> until the end of yesterday. Expressions such as date:today..today >> means since the beginning of today until the end of today. > > IMO this is totally unintuitive and not how the range should work. > date:foo..bar should return messages whose date >=3D foo and < bar. So > for instance date:november..yesterday should return messages whose date > is > 2012/11/01 00:00:00 and < 2012/09/12 00:00:00. So to get > yesterdays messages one would do: date:yesterday..today. I find yesterday..yesterday to return whole yesterday's messages more intuitive than that returning zero messages and requiring yesterday..today to see messages sent yesterday. However, I've noticed that range described as -1day..-1day (if that syntax is/were supported) that would be a bit confusing (In yesterday's case I think the length of 'yesterday' is 24h, but in '-1day' the lenght is one second (or something)) Anyway, this just emphasizes that this is confusing matter; we need a good idiom to comprehend this issue... Tomi > >> Open-ended ranges are supported (since Xapian 1.2.1), i.e. you can >> specify date:..until or date:since.. to not limit the start or end >> date, respectively. >> >> CAVEATS: >> >> Xapian does not support spaces in range expressions. You can replace >> the spaces with '_', or (in most cases) '-', or (in some cases) leave >> the spaces out altogether. > > --=20 > Best regards, _ _ > .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o > ..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz = (o o) > ooo +------------------ooO--(_)--Ooo--_______= ________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch