From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id DFF846DE0C64 for ; Sat, 12 May 2018 07:01:17 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[AWL=0.011, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WRdtbZIHhFTM for ; Sat, 12 May 2018 07:01:16 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id A50C26DE0C5F for ; Sat, 12 May 2018 07:01:16 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1fHV5C-0000Fn-Kh; Sat, 12 May 2018 10:01:10 -0400 Received: (nullmailer pid 29852 invoked by uid 1000); Sat, 12 May 2018 14:01:09 -0000 From: David Bremner To: Tomi Ollila , Daniel Kahn Gillmor , notmuch@notmuchmail.org Subject: Re: Thread subqueries In-Reply-To: References: <20180505160523.9749-1-david@tethera.net> <87fu33d5vk.fsf@tethera.net> <878t8qzino.fsf@fifthhorseman.net> <87in7ubir6.fsf@tethera.net> <87603uyzay.fsf@fifthhorseman.net> Date: Sat, 12 May 2018 11:01:09 -0300 Message-ID: <87fu2x6kii.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 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: Sat, 12 May 2018 14:01:18 -0000 Tomi Ollila writes: > > question: how does these differ (processing-wise): > > $ notmuch count 'thread:"date:1month..now tag:dkg"' the thread field processor receives the string "date:1month..now tag:dkg" (without the quotes) which it treats as a thread id, and doesn't match anything > $ notmuch count 'thread:{date:1month..now tag:dkg}' the t.f.p. receives the string "{date:1month..now" (without quotes) because the top level query parser splits at spaces, unless prevented by "". This it considers syntactically invalid, rather than silently dropping the second term. > $ notmuch count 'thread:"{date:1month..now tag:dkg}"' The t.f.p. receives the string "{date:1month..now tag:dkg}" (without quotes). It notes the first and last character, and triggers a subquery expansion. The thing to keep in mind is that we have no control over the top level "tokenization" by Xapian, except for using "".