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 C32286DE0F6A for ; Sun, 11 Aug 2019 16:09:05 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.052 X-Spam-Level: X-Spam-Status: No, score=-0.052 tagged_above=-999 required=5 tests=[AWL=-0.051, SPF_PASS=-0.001] 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 6iB-is-SXGYS for ; Sun, 11 Aug 2019 16:09:03 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id B13FF6DE0F56 for ; Sun, 11 Aug 2019 16:09:03 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1hwwxP-0004Ih-LN; Sun, 11 Aug 2019 19:08:59 -0400 Received: (nullmailer pid 11128 invoked by uid 1000); Sun, 11 Aug 2019 23:08:58 -0000 From: David Bremner To: "Jorge P. de Morais Neto" , notmuch@notmuchmail.org Subject: Re: Apparently, terms with a common prefix are *not* connected by implicit "OR" In-Reply-To: <87lfvzipp5.fsf@disroot.org> References: <87lfvzipp5.fsf@disroot.org> Date: Sun, 11 Aug 2019 20:08:58 -0300 Message-ID: <87ef1ri9kl.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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: Sun, 11 Aug 2019 23:09:05 -0000 jorge+list@disroot.org (Jorge P. de Morais Neto) writes: > Hi. The NOTMUCH-SEARCH-TERMS man page says: > > Each term in the query will be implicitly connected by a logical AND > if no explicit operator is provided (except that terms with a common > prefix will be implicitly combined with OR). > > However, in practice I get different results: > $ notmuch count '(to:pontodosconcursos.com.br OR to:jorge+cp+concurso@disroot.org)' > 66 > $ notmuch count '(to:pontodosconcursos.com.br to:jorge+cp+concurso@disroot.org)' > 0 > Thanks for the report. As a test, can you try with $ notmuch count '(to:pontodosconcursos.com.br to:"jorge+cp+concurso@disroot.org")' I suspect that will work around the problem, which I believe is related to the way that notmuch uses the xapian parser (in order to provide regexp matching for some prefixes). In particular, if I try that with NOTMUCH_DEBUG_QUERY=yes in the environment I can see the implicit OR. d