From: Austin Clements <amdragon@gmail.com>
To: "Joel Borggrén-Franck" <joel.borggren.franck@gmail.com>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] add headers cc: bcc: and to: (as exactto:) to search index
Date: Sun, 12 Dec 2010 14:39:27 -0500 [thread overview]
Message-ID: <AANLkTikDQgpeM-Ari2woxUgwpuAH3VVq-O-vQvOGU-hO@mail.gmail.com> (raw)
In-Reply-To: <AANLkTik2ADv1fb4kD+=EOhQ+rkkQBVzRMnpyE5Z+7TJs@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]
Add the "exactto", "cc", and "bcc" terms just like you do but *remove*
the "to" term altogether. Then in notmuch_database_open, after it's added
the usual probabilistic prefixes, do something like
notmuch->query_parser->add_prefix ("to", _find_prefix ("exactto"));
notmuch->query_parser->add_prefix ("to", _find_prefix ("cc"));
notmuch->query_parser->add_prefix ("to", _find_prefix ("bcc"));
I haven't tried this, but I believe the effect will be that a query of the
form to:x will be expanded by the query parser to (exactto:x OR cc:x OR
bcc:x), which should achieve what you want without any database overhead.
You might also want
notmuch->query_parser->add_prefix ("to", "XTO");
to maintain some form of backwards compatibility.
On Sun, Dec 12, 2010 at 5:43 AM, Joel Borggrén-Franck <
joel.borggren.franck@gmail.com> wrote:
> On Sun, Dec 12, 2010 at 7:41 AM, Austin Clements <amdragon@gmail.com>
> wrote:
> > Short of full header indexing, wouldn't a better way to achieve this be
> to
> > store only the "to" header as "XTO", the "cc" header "XCC", and the "bcc"
> > header as "XBCC" and use Xapian's multi-prefix support to map the "to:"
> > query prefix to "XTO", "XCC", and "XBCC"? That way you're not storing
> twice
> > as many copies of every address.
> >
>
> Probably. I know nothing of Xapian, how would you solve it?
>
> cheers
> /Joel
>
[-- Attachment #2: Type: text/html, Size: 2286 bytes --]
next prev parent reply other threads:[~2010-12-12 19:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-01 20:33 [PATCH] add headers cc: bcc: and to: (as exactto:) to search index Joel Borggrén-Franck
2010-12-02 17:48 ` Dirk Hohndel
2010-12-03 5:49 ` Xavier Maillard
2010-12-12 6:41 ` Austin Clements
2010-12-12 10:43 ` Joel Borggrén-Franck
2010-12-12 19:39 ` Austin Clements [this message]
2010-12-12 22:01 ` servilio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTikDQgpeM-Ari2woxUgwpuAH3VVq-O-vQvOGU-hO@mail.gmail.com \
--to=amdragon@gmail.com \
--cc=joel.borggren.franck@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).