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 4F8CC6DE01EC for ; Sat, 29 Sep 2018 15:09:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.002 X-Spam-Level: X-Spam-Status: No, score=0.002 tagged_above=-999 required=5 tests=[AWL=0.013, 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 fq6b-6RdPaMd for ; Sat, 29 Sep 2018 15:09:06 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 61CA06DE0151 for ; Sat, 29 Sep 2018 15:09:06 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1g6NQ6-00017k-4p; Sat, 29 Sep 2018 18:09:02 -0400 Received: (nullmailer pid 17201 invoked by uid 1000); Sat, 29 Sep 2018 22:09:01 -0000 From: David Bremner To: xapian-discuss@lists.xapian.org Cc: notmuch@notmuchmail.org Subject: xapian parser bug? Date: Sat, 29 Sep 2018 19:09:01 -0300 Message-ID: <87a7o02bya.fsf@tethera.net> 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.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, 29 Sep 2018 22:09:08 -0000 Today we noticed that keywords can't be searched as prefixed terms. Or that's what it looks like anyway. I tested and, or, and not. =E2=95=B0=E2=94=80% NOTMUCH_DEBUG_QUERY=3Dy notmuch search 'subject:"and"' Query string is: subject:"and" notmuch search: A Xapian exception occurred A Xapian exception occurred parsing query: Syntax: AND Query string was: subject:"and" =E2=95=B0=E2=94=80% NOTMUCH_DEBUG_QUERY=3Dy notmuch search 'subject:"or"'=20 Query string is: subject:"or" notmuch search: A Xapian exception occurred A Xapian exception occurred parsing query: Syntax: OR Query string was: subject:"or" =E2=95=B0=E2=94=80% NOTMUCH_DEBUG_QUERY=3Dy notmuch search 'subject:"not"' Query string is: subject:"not" notmuch search: A Xapian exception occurred A Xapian exception occurred parsing query: Syntax: NOT Query string was: subject:"not" Interestingly, putting space around the operator seems to be a workaround. Something about turning on phrase parsing maybe? =E2=95=B0=E2=94=80% NOTMUCH_DEBUG_QUERY=3Dy notmuch count 'subject:" not "' Query string is: subject:" not " Exclude query is: Query((((Kspam OR Kdeleted) OR Kmuted) OR Kbad-address)) Final query is: Query(((Tmail AND 0 * XSUBJECTnot@1) AND_NOT (((Kspam OR Kdeleted) OR Kmute= d) OR Kbad-address))) 9927