Re: [notmuch] strange behavior of indexing of and searching for strings containing...
authorOlly Betts <olly@survex.com>
Fri, 5 Feb 2010 23:48:03 +0000 (23:48 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:07 +0000 (09:36 -0800)
2b/3a49d8af039122870490319229a90a88dd62c3 [new file with mode: 0644]

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