1 Return-Path: <amdragon@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id F2B99431FB6
\r
6 for <notmuch@notmuchmail.org>; Sun, 12 Dec 2010 11:39:29 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.798 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7]
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id QnFEX9rjqioN for <notmuch@notmuchmail.org>;
\r
18 Sun, 12 Dec 2010 11:39:29 -0800 (PST)
\r
19 Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com
\r
21 by olra.theworths.org (Postfix) with ESMTP id 559A6431FB5
\r
22 for <notmuch@notmuchmail.org>; Sun, 12 Dec 2010 11:39:29 -0800 (PST)
\r
23 Received: by qwe5 with SMTP id 5so5992414qwe.26
\r
24 for <notmuch@notmuchmail.org>; Sun, 12 Dec 2010 11:39:27 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=domainkey-signature:mime-version:received:received:in-reply-to
\r
27 :references:date:message-id:subject:from:to:cc:content-type;
\r
28 bh=bgGWwMT4fngRF8Lz4DKjiU8sWhjQb1SRfjX7CrCeyCY=;
\r
29 b=v7wgYdP7x8Vh3Kw5szoaXhWdLf26hmcMEgkb6IeLRcPefL87eczMnwYagw9BQMVM1e
\r
30 1Oa9KxVCKw9Ci/UhI+Sj6DT/t78t3/GSdFD6NxXBUp5JFbvt6CaYq6EDZJM9APdwu3im
\r
31 h7HtH2bo+sG04q81nqWkwNrNDLnvL8a+gsq4c=
\r
32 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
33 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
\r
35 b=m1zxNtXjrDczRhsrHh0mH7UosdgL1/b7EgOyoqd7NLWCwggfvmjF0USzDpo37Hryl1
\r
36 nQmOE5X6EoJ0B5P7lr3MuAceGkm4srnSCESFvt3O5A8ETHxtH8iZTuLApi4SeVT0OOzg
\r
37 EXgYhNJu22KAG++eKAYLDgIhhokC8U2NBumxQ=
\r
39 Received: by 10.229.95.193 with SMTP id e1mr2989002qcn.277.1292182767489; Sun,
\r
40 12 Dec 2010 11:39:27 -0800 (PST)
\r
41 Received: by 10.229.224.202 with HTTP; Sun, 12 Dec 2010 11:39:27 -0800 (PST)
\r
42 In-Reply-To: <AANLkTik2ADv1fb4kD+=EOhQ+rkkQBVzRMnpyE5Z+7TJs@mail.gmail.com>
\r
43 References: <1291235635-16523-1-git-send-email-joel.borggren.franck@gmail.com>
\r
44 <AANLkTinX_07ZucHbf6kVAsy-quauY+N9hMhJwKjMt1Dk@mail.gmail.com>
\r
45 <AANLkTik2ADv1fb4kD+=EOhQ+rkkQBVzRMnpyE5Z+7TJs@mail.gmail.com>
\r
46 Date: Sun, 12 Dec 2010 14:39:27 -0500
\r
47 Message-ID: <AANLkTikDQgpeM-Ari2woxUgwpuAH3VVq-O-vQvOGU-hO@mail.gmail.com>
\r
48 Subject: Re: [PATCH] add headers cc: bcc: and to: (as exactto:) to search
\r
50 From: Austin Clements <amdragon@gmail.com>
\r
51 To: =?ISO-8859-1?Q?Joel_Borggr=E9n=2DFranck?= <joel.borggren.franck@gmail.com>
\r
52 Content-Type: multipart/alternative; boundary=0016368325acd752ae04973bbe6c
\r
53 Cc: notmuch@notmuchmail.org
\r
54 X-BeenThere: notmuch@notmuchmail.org
\r
55 X-Mailman-Version: 2.1.13
\r
57 List-Id: "Use and development of the notmuch mail system."
\r
58 <notmuch.notmuchmail.org>
\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
62 List-Post: <mailto:notmuch@notmuchmail.org>
\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
66 X-List-Received-Date: Sun, 12 Dec 2010 19:39:30 -0000
\r
68 --0016368325acd752ae04973bbe6c
\r
69 Content-Type: text/plain; charset=ISO-8859-1
\r
70 Content-Transfer-Encoding: quoted-printable
\r
72 Add the "exactto", "cc", and "bcc" terms just like you do but *remove*
\r
73 the "to" term altogether. Then in notmuch_database_open, after it's added
\r
74 the usual probabilistic prefixes, do something like
\r
75 notmuch->query_parser->add_prefix ("to", _find_prefix ("exactto"));
\r
76 notmuch->query_parser->add_prefix ("to", _find_prefix ("cc"));
\r
77 notmuch->query_parser->add_prefix ("to", _find_prefix ("bcc"));
\r
78 I haven't tried this, but I believe the effect will be that a query of the
\r
79 form to:x will be expanded by the query parser to (exactto:x OR cc:x OR
\r
80 bcc:x), which should achieve what you want without any database overhead.
\r
82 notmuch->query_parser->add_prefix ("to", "XTO");
\r
83 to maintain some form of backwards compatibility.
\r
85 On Sun, Dec 12, 2010 at 5:43 AM, Joel Borggr=E9n-Franck <
\r
86 joel.borggren.franck@gmail.com> wrote:
\r
88 > On Sun, Dec 12, 2010 at 7:41 AM, Austin Clements <amdragon@gmail.com>
\r
90 > > Short of full header indexing, wouldn't a better way to achieve this be
\r
92 > > store only the "to" header as "XTO", the "cc" header "XCC", and the "bc=
\r
94 > > header as "XBCC" and use Xapian's multi-prefix support to map the "to:"
\r
95 > > query prefix to "XTO", "XCC", and "XBCC"? That way you're not storing
\r
97 > > as many copies of every address.
\r
100 > Probably. I know nothing of Xapian, how would you solve it?
\r
106 --0016368325acd752ae04973bbe6c
\r
107 Content-Type: text/html; charset=ISO-8859-1
\r
108 Content-Transfer-Encoding: quoted-printable
\r
110 Add the=A0"exactto", "cc", and "bcc" terms ju=
\r
111 st like you do but *remove* the=A0"to" term altogether. =A0Then i=
\r
112 n notmuch_database_open, after it's added the usual probabilistic prefi=
\r
113 xes, do something like<div>
\r
114 =A0=A0notmuch->query_parser->add_prefix ("to", _find_prefix=
\r
115 ("exactto"));</div><div><meta http-equiv=3D"content-type" conten=
\r
116 t=3D"text/html; charset=3Dutf-8">=A0=A0notmuch->query_parser->add_pre=
\r
117 fix ("to", _find_prefix ("cc"));</div>
\r
118 <div><meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf-=
\r
119 8">=A0=A0notmuch->query_parser->add_prefix ("to", _find_pre=
\r
120 fix ("bcc"));<br>I haven't tried this, but I believe the effe=
\r
121 ct will be that a query of the form to:x will be expanded by the query pars=
\r
122 er to (exactto:x OR cc:x OR bcc:x), which should achieve what you want with=
\r
123 out any database overhead. =A0You might also want</div>
\r
124 <div><meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf-=
\r
125 8">=A0=A0notmuch->query_parser->add_prefix ("to", "XTO=
\r
126 ");</div><div>to maintain some form of backwards compatibility.</div><=
\r
128 <div class=3D"gmail_quote">On Sun, Dec 12, 2010 at 5:43 AM, Joel Borggr=E9n=
\r
129 -Franck <span dir=3D"ltr"><<a href=3D"mailto:joel.borggren.franck@gmail.=
\r
130 com">joel.borggren.franck@gmail.com</a>></span> wrote:<br><blockquote cl=
\r
131 ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
\r
133 <div class=3D"im">On Sun, Dec 12, 2010 at 7:41 AM, Austin Clements <<a h=
\r
134 ref=3D"mailto:amdragon@gmail.com">amdragon@gmail.com</a>> wrote:<br>
\r
135 > Short of full header indexing, wouldn't a better way to achieve th=
\r
137 > store only the "to" header as "XTO", the "cc&=
\r
138 quot; header "XCC", and the "bcc"<br>
\r
139 > header as "XBCC" and use Xapian's multi-prefix support t=
\r
140 o map the "to:"<br>
\r
141 > query prefix to "XTO", "XCC", and "XBCC"=
\r
142 ? =A0That way you're not storing twice<br>
\r
143 > as many copies of =A0every address.<br>
\r
146 </div>Probably. I know nothing of Xapian, how would you solve it?<br>
\r
149 <font color=3D"#888888">/Joel<br>
\r
150 </font></blockquote></div><br></div>
\r
152 --0016368325acd752ae04973bbe6c--
\r