--- /dev/null
+Return-Path: <aclements@csail.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 arlo.cworth.org (Postfix) with ESMTP id 6EB466DE01F7\r
+ for <notmuch@notmuchmail.org>; Mon, 6 Jun 2016 13:09:26 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.823\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.823 tagged_above=-999 required=5\r
+ tests=[AWL=-0.813, HTML_MESSAGE=0.001, SPF_PASS=-0.001,\r
+ T_RP_MATCHES_RCVD=-0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id Ti-kiAZDuIZc for <notmuch@notmuchmail.org>;\r
+ Mon, 6 Jun 2016 13:09:17 -0700 (PDT)\r
+X-Greylist: delayed 2913 seconds by postgrey-1.35 at arlo;\r
+ Mon, 06 Jun 2016 13:08:57 PDT\r
+Received: from outgoing-tmp.csail.mit.edu (outgoing-tmp.csail.mit.edu\r
+ [128.30.2.206])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 063316DE0217\r
+ for <notmuch@notmuchmail.org>; Mon, 6 Jun 2016 13:08:56 -0700 (PDT)\r
+Received: from mail-yw0-f173.google.com ([209.85.161.173])\r
+ by outgoing-tmp.csail.mit.edu with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)\r
+ (Exim 4.82) (envelope-from <aclements@csail.mit.edu>)\r
+ id 1bA04T-0001og-80\r
+ for notmuch@notmuchmail.org; Mon, 06 Jun 2016 15:20:21 -0400\r
+Received: by mail-yw0-f173.google.com with SMTP id c127so149455948ywb.1\r
+ for <notmuch@notmuchmail.org>; Mon, 06 Jun 2016 12:20:21 -0700 (PDT)\r
+X-Gm-Message-State: ALyK8tJzsZjhatT/stPriuVDauiazZsgnRt3IN/TeSV3HzCqPCyvNkrLFljgQTSX0n/Vnw05iAGS63zbY6Cfqg==\r
+X-Received: by 10.129.45.196 with SMTP id t187mr13435296ywt.153.1465240820424;\r
+ Mon, 06 Jun 2016 12:20:20 -0700 (PDT)\r
+MIME-Version: 1.0\r
+Received: by 10.37.200.7 with HTTP; Mon, 6 Jun 2016 12:20:19 -0700 (PDT)\r
+In-Reply-To: <878tyins3j.fsf@tesseract.cs.unb.ca>\r
+References: <1465196150-astroid-3-33kf2otxir-16915@strange>\r
+ <87lh2ijxor.fsf@tesseract.cs.unb.ca>\r
+ <1465217156-astroid-4-8l08w9cils-2318@strange>\r
+ <877fe2tiy8.fsf@uwaterloo.ca> <878tyins3j.fsf@tesseract.cs.unb.ca>\r
+From: Austin Clements <aclements@csail.mit.edu>\r
+Date: Mon, 6 Jun 2016 15:20:19 -0400\r
+X-Gmail-Original-Message-ID:\r
+ <CAH-f9WtC6CeVecfg8wFZUVc8K2rUfzsP72xo97sJX2y_mLW6-g@mail.gmail.com>\r
+Message-ID:\r
+ <CAH-f9WtC6CeVecfg8wFZUVc8K2rUfzsP72xo97sJX2y_mLW6-g@mail.gmail.com>\r
+Subject: Re: searching: '*analysis' vs 'reanalysis'\r
+To: David Bremner <david@tethera.net>\r
+Cc: sfischme@uwaterloo.ca, Gaute Hope <eg@gaute.vetsj.com>, \r
+ notmuch <notmuch@notmuchmail.org>\r
+Content-Type: multipart/alternative; boundary=001a1141df549cccb00534a0f6b3\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 06 Jun 2016 20:09:26 -0000\r
+\r
+--001a1141df549cccb00534a0f6b3\r
+Content-Type: text/plain; charset=UTF-8\r
+\r
+On Mon, Jun 6, 2016 at 1:29 PM, David Bremner <david@tethera.net> wrote:\r
+\r
+> Sebastian Fischmeister <sfischme@uwaterloo.ca> writes:\r
+>\r
+> >\r
+> > I ran into this problem before as well. Storage is cheap. Notmuch could\r
+> > index all emails with reversed text to get around some of this\r
+> > problem. It doesn't solve the problem of *analysis*, but it's still an\r
+> > improvement.\r
+>\r
+> It would probably be more useful to have brute force regexp searches on\r
+> headers. Austin did some experiments that sounded promising, where you\r
+> basically postprocess the result of a xapian query with a regexp. OTOH,\r
+> I don't know what kept him from proposing this for mainline. If it was\r
+> just parser issues, those are probably more or less solved now, at least\r
+> for people using xapian 1.3+\r
+>\r
+\r
+The experiment was specifically for regexp matching subject, but it should\r
+work for any header we store a literal copy of in the database. The code is\r
+here, though in its current form it builds on my custom query parser:\r
+https://github.com/aclements/notmuch/commit/ce41b29aba4d9b84e2f1eb6ed8df67065196c960.\r
+Based on my understanding of Xapian 1.3+ field processors, these days it\r
+should be quite easy to hook the PostingSource in that commit into the\r
+Xapian QueryProcessor.\r
+\r
+--001a1141df549cccb00534a0f6b3\r
+Content-Type: text/html; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On M=\r
+on, Jun 6, 2016 at 1:29 PM, David Bremner <span dir=3D"ltr"><<a href=3D"=\r
+mailto:david@tethera.net" target=3D"_blank">david@tethera.net</a>></span=\r
+> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=\r
+.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(20=\r
+4,204,204);padding-left:1ex">Sebastian Fischmeister <<a href=3D"mailto:s=\r
+fischme@uwaterloo.ca">sfischme@uwaterloo.ca</a>> writes:<br>\r
+<br>\r
+><br>\r
+> I ran into this problem before as well. Storage is cheap. Notmuch coul=\r
+d<br>\r
+> index all emails with reversed text to get around some of this<br>\r
+> problem. It doesn't solve the problem of *analysis*, but it's =\r
+still an<br>\r
+> improvement.<br>\r
+<br>\r
+It would probably be more useful to have brute force regexp searches on<br>\r
+headers.=C2=A0 Austin did some experiments that sounded promising, where yo=\r
+u<br>\r
+basically postprocess the result of a xapian query with a regexp. OTOH,<br>\r
+I don't know what kept him from proposing this for mainline. If it was<=\r
+br>\r
+just parser issues, those are probably more or less solved now, at least<br=\r
+>\r
+for people using xapian 1.3+<br></blockquote><div><br></div><div>The experi=\r
+ment was specifically for regexp matching subject, but it should work for a=\r
+ny header we store a literal copy of in the database. The code is here, tho=\r
+ugh in its current form it builds on my custom query parser:=C2=A0<a href=\r
+=3D"https://github.com/aclements/notmuch/commit/ce41b29aba4d9b84e2f1eb6ed8d=\r
+f67065196c960">https://github.com/aclements/notmuch/commit/ce41b29aba4d9b84=\r
+e2f1eb6ed8df67065196c960</a>. Based on my understanding of Xapian 1.3+ fiel=\r
+d processors, these days it should be quite easy to hook the PostingSource =\r
+in that commit into the Xapian QueryProcessor.</div></div></div></div>\r
+\r
+--001a1141df549cccb00534a0f6b3--\r