Re: Searching from a folder
authorAustin Clements <amdragon@MIT.EDU>
Mon, 1 Oct 2012 12:16:25 +0000 (08:16 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:41 +0000 (09:49 -0800)
84/8d07828530d44051bfd8ef65e49c7ca7eb76b5 [new file with mode: 0644]

diff --git a/84/8d07828530d44051bfd8ef65e49c7ca7eb76b5 b/84/8d07828530d44051bfd8ef65e49c7ca7eb76b5
new file mode 100644 (file)
index 0000000..5b158ff
--- /dev/null
@@ -0,0 +1,113 @@
+Return-Path: <amdragon@mit.edu>\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 92306431FBC\r
+       for <notmuch@notmuchmail.org>; Mon,  1 Oct 2012 05:16:32 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 rvHzs0Zyrblc for <notmuch@notmuchmail.org>;\r
+       Mon,  1 Oct 2012 05:16:30 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
+       [18.7.68.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id DBC96431FAE\r
+       for <notmuch@notmuchmail.org>; Mon,  1 Oct 2012 05:16:29 -0700 (PDT)\r
+X-AuditID: 12074424-b7fce6d000000925-ec-5069899c285d\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+       by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id D8.7C.02341.C9989605; Mon,  1 Oct 2012 08:16:28 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q91CGSkX018535; \r
+       Mon, 1 Oct 2012 08:16:28 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q91CGQME007795\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 1 Oct 2012 08:16:27 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1TIevB-0004YG-Ut; Mon, 01 Oct 2012 08:16:25 -0400\r
+Date: Mon, 1 Oct 2012 08:16:25 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Damien Cassou <damien.cassou@gmail.com>\r
+Subject: Re: Searching from a folder\r
+Message-ID: <20121001121625.GD26662@mit.edu>\r
+References:\r
+ <CA+y5ggh-PFtHsRgpdXje9z2gsrsonMNi0gqDTfpQ42jXNmJ3dg@mail.gmail.com>\r
+       <20120929161158.GX26662@mit.edu>\r
+       <CA+y5ggiM-8XPDcD4mJjF9GKm+yEzp1wO-NM7UsebowCUWUWkVw@mail.gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To:\r
+ <CA+y5ggiM-8XPDcD4mJjF9GKm+yEzp1wO-NM7UsebowCUWUWkVw@mail.gmail.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmplleLIzCtJLcpLzFFi42IR4hTV1p3TmRlg0N5gY7Hr7lYmi+s3ZzI7\r
+       MHnsnHWX3ePZqlvMAUxRXDYpqTmZZalF+nYJXBlrz81nKtjOXbGmvYGpgXE3ZxcjJ4eEgInE\r
+       lPWvmCFsMYkL99azdTFycQgJ7GOU+HB4KSuEs55RYnbXUxYI5wSTxN3/95ghnCWMEtcmHwTr\r
+       ZxFQkVg34TOYzSagIbFt/3JGEFtEQFvizdIOVhCbWUBa4tvvZiYQWxiofsubQ2BxXgEdieWH\r
+       e6DW7WKUmLmymwkiIShxcuYTFohmLYkb/14CxTnABi3/xwES5hQIlLjS8Q5sjijQzCknt7FN\r
+       YBSahaR7FpLuWQjdCxiZVzHKpuRW6eYmZuYUpybrFicn5uWlFuma6+VmluilppRuYgSFNruL\r
+       yg7G5kNKhxgFOBiVeHgXXM4IEGJNLCuuzD3EKMnBpCTKu6stM0CILyk/pTIjsTgjvqg0J7X4\r
+       EKMEB7OSCK99DlCONyWxsiq1KB8mJc3BoiTOez3lpr+QQHpiSWp2ampBahFMVoaDQ0mCd3kH\r
+       UKNgUWp6akVaZk4JQpqJgxNkOA/Q8LkgNbzFBYm5xZnpEPlTjIpS4rzNIAkBkERGaR5cLyz1\r
+       vGIUB3pFmLcJpIoHmLbgul8BDWYCGly1Kg1kcEkiQkqqgZG123r26+KG2Vyb9n1Q7bilv8vY\r
+       ybqc8UnpbHsj/a2TxIT3mh/g2Omp8fjLjXy/qAf3e3gMRcVNz70NfW1n0++24DyLcMu5TY53\r
+       /tyK8KkUaLp2XUx9Tz//Wu+57gV3SiLVd7/5+DB98paAEKltGp+VPryuqpuytWJmdfSet9uO\r
+       PJY5O/2pR4cSS3FGoqEWc1FxIgBENzcRGAMAAA==\r
+Cc: notmuch@notmuchmail.org\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: Mon, 01 Oct 2012 12:16:32 -0000\r
+\r
+Quoth Damien Cassou on Oct 01 at 11:42 am:\r
+> On Sat, Sep 29, 2012 at 6:12 PM, Austin Clements <amdragon@mit.edu> wrote:\r
+> > $ notmuch search 'folder:"[Gmail].All Mail"'\r
+> > $ notmuch search 'folder:"[Gmail].Important"'\r
+> \r
+> thank you very much, it indeed works. I'm still a bit puzzled by the\r
+> fact that, on my other mailbox, I'm getting the following results:\r
+> \r
+> $ notmuch search 'folder:"[Gmail].Important"' | wc --lines\r
+> 8928\r
+> $ notmuch search folder:[Gmail].Important | wc --lines\r
+> 138\r
+> \r
+> So, without using quoting, something is indeed happening. Do you know what?\r
+\r
+In the latter case, you're finding emails that contain the words\r
+"folder" (or words like folder), "gmail", and "important".\r
+\r
+$ NOTMUCH_DEBUG_QUERY=1 notmuch search 'folder:"[Gmail].Important"'\r
+Final query is:\r
+Xapian::Query((Tmail AND (XFOLDERgmail:(pos=1) PHRASE 2 XFOLDERimportant:(pos=2))))\r
+\r
+This is slightly inscrutable, but you can see that it applied the\r
+folder prefix ("XFOLDER") to both "gmail" and "important" and required\r
+that the two terms appear in a phrase (that is, next to each other).\r
+\r
+$ NOTMUCH_DEBUG_QUERY=1 notmuch search 'folder:[Gmail].Important'\r
+Final query is:\r
+Xapian::Query((Tmail AND Zfolder:(pos=1) AND gmail:(pos=2) AND important:(pos=3)))\r
+\r
+Whereas here, it's searching for folder, gmail, and important as\r
+regular and completely independent terms (the Z on folder means it's\r
+stemmed, so it will match folders, foldered, etc.)\r