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 41C4D431FBD for ; Fri, 5 Feb 2010 15:48:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.778 X-Spam-Level: X-Spam-Status: No, score=-0.778 tagged_above=-999 required=5 tests=[AWL=-0.779, BAYES_50=0.001] autolearn=ham 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 5tZvj4Kp8fY5 for ; Fri, 5 Feb 2010 15:48:28 -0800 (PST) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by olra.theworths.org (Postfix) with ESMTP id 372B3431FAE for ; Fri, 5 Feb 2010 15:48:28 -0800 (PST) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NdXuS-0004nN-Si for notmuch@notmuchmail.org; Sat, 06 Feb 2010 00:48:24 +0100 Received: from ip-118-90-138-203.xdsl.xnet.co.nz ([118.90.138.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Feb 2010 00:48:24 +0100 Received: from olly by ip-118-90-138-203.xdsl.xnet.co.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Feb 2010 00:48:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: notmuch@notmuchmail.org From: Olly Betts Date: Fri, 5 Feb 2010 23:48:03 +0000 (UTC) Lines: 45 Message-ID: References: <87636bws2o.fsf@servo.finestructure.net> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-118-90-138-203.xdsl.xnet.co.nz User-Agent: slrn/pre1.0.0-11 (Linux) Sender: news Subject: Re: [notmuch] strange behavior of indexing of and searching for strings containing '[]' 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: Fri, 05 Feb 2010 23:48:31 -0000 On 2010-02-05, Jameson Rollins wrote: > Hey, folks. I've been noticing some strange behavior of notmuch search > results for strings containing '[]'. Here are some searches for some > exact strings in messages subjects: The '[]' is a red herring. Xapian's TermGenerator and QueryParser classes treat these two characters pretty much as if they were spaces. > servo:~ 0$ notmuch search subject:'emacs paned UI' Note that the '' is quoting for the shell only here. So Xapian sees: subject:emacs paned UI Assuming you are defaulting to an AND search, that's `emacs in the subject' AND `paned anywhere in the indexed text' AND `UI anywhere in the indexed text'. To specify a quoted phrase you want "" anyway (not ''), so the command matching what I think you intended to search for is: notmuch search 'subject:"emacs paned UI"' > servo:~ 0$ notmuch search subject:'[notmuch] emacs paned UI' notmuch search 'subject:"[notmuch] emacs paned UI"' Which should return identical results to: notmuch search 'subject:"notmuch emacs paned UI"' > thread:5f2cb4b108773a39161b33c86e54f7fd 4 mins. ago [1/1] Jameson Rollins;= > [notmuch] loss of duplicate messages (inbox) > servo:~ 0$=20 > > Not only did it not turn up the message that *does* match that exact > string in it's subject line, it actually turns up a completely different > message that doesn't match the search term at all! It matches the notmuch in the subject, and presumably emacs, paned, and UI in the body. > [snip the rest - the same explanations apply] Cheers, Olly