From: Jani Nikula Date: Mon, 20 May 2013 14:19:41 +0000 (+0200) Subject: Re: how the date query works? X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=95d2c27c0e3108699b1439dcab079783de0dec68;p=notmuch-archives.git Re: how the date query works? --- diff --git a/9a/3194ab2a5c3071649cd8c74c36a696cb3da762 b/9a/3194ab2a5c3071649cd8c74c36a696cb3da762 new file mode 100644 index 000000000..ce4c7e8af --- /dev/null +++ b/9a/3194ab2a5c3071649cd8c74c36a696cb3da762 @@ -0,0 +1,92 @@ +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 406DD431FBC + for ; Mon, 20 May 2013 07:19:55 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 U+J1n5RuY3IA for ; + Mon, 20 May 2013 07:19:49 -0700 (PDT) +Received: from mail-we0-f172.google.com (mail-we0-f172.google.com + [74.125.82.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 04338431FB6 + for ; Mon, 20 May 2013 07:19:48 -0700 (PDT) +Received: by mail-we0-f172.google.com with SMTP id w62so373205wes.31 + for ; Mon, 20 May 2013 07:19:47 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=x-received:from:to:subject:in-reply-to:references:user-agent:date + :message-id:mime-version:content-type:x-gm-message-state; + bh=MN5Kcl79X4/c7phmX1WJcWsbvNomXC8g9xkxQZaSeEI=; + b=H62ma55hI/kkM8cb2JHI5+5gnsiTJHocN1RSEL9Xnsg1NRIAubPeiIy+JmfE7WnTXz + 8ieQ2L9lTQao9PDP4oVZXi9sbO1mINkNAWOGIJlm7GwyFfGvj3WK5dlmKPTVWC5B0XCv + LHPJt9zKXgL5UNsOI9CYxgPrR+oCKZlzgkYAieEqHl+KRHJDZfKdPgYYzLYsW9raRRFV + zVlyN+4qeNntzX/kKlmJo7I8ePK1F+uzGQIzCq0FydBiQ/u5/z0hzx/bikB+1WjcTgh7 + vydleqBDYhXETPVtnWKItHrgccxwe6CHYiGiz7VTmsTpHluvwziGxPxFsMDGcgLfNGe8 + ucsg== +X-Received: by 10.180.76.194 with SMTP id m2mr14438037wiw.4.1369059587204; + Mon, 20 May 2013 07:19:47 -0700 (PDT) +Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3]) + by mx.google.com with ESMTPSA id cw8sm15046855wib.7.2013.05.20.07.19.45 + for + (version=TLSv1.1 cipher=RC4-SHA bits=128/128); + Mon, 20 May 2013 07:19:46 -0700 (PDT) +From: Jani Nikula +To: David Belohrad , notmuch +Subject: Re: how the date query works? +In-Reply-To: +References: +User-Agent: Notmuch/0.15.2+86~g2be3ce0 (http://notmuchmail.org) Emacs/23.2.1 + (x86_64-pc-linux-gnu) +Date: Mon, 20 May 2013 16:19:41 +0200 +Message-ID: <87mwrpvima.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Gm-Message-State: + ALoCoQlxfGnQytzwdh/t/k0FfAa+8pWXXkGjoYhzbpS/t4j8u0utfSca1x2fagKI5WB2YaYxWu3a +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: Mon, 20 May 2013 14:19:55 -0000 + +On Mon, 20 May 2013, David Belohrad wrote: +> When I open in emacs search, and I type 'date:today', some output +> appears, but not the one I would expect. + +The date: search expects a Xapian range expression, which requires ".." +to be present in the query. For example, date:today..today from +beginning of today to end of today, which I believe is what you're +after. Half open ranges are okay, too, so assuming you don't have much +mail from the future, simply date:today.. will do. + +Unfortunately, due to a limitation in Xapian, we can't flag an error or +do the right thing given a date: search without the range expression +".." + +> Is there any kind of manual how to use it? I'm of course particularly +> interested in 'today', 'yesterday', 'last week', 'last month' :) + +The search terms manual page, 'man notmuch-search-terms', which is also +available at http://notmuchmail.org/manpages/notmuch-search-terms-7/ +gives a pretty good summary on the date search, including the +limitations. + +HTH, +Jani.