From: David Bremner <david@tethera.net>
To: William Casarin <jb55@jb55.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH RFC] index: add body: search query term
Date: Wed, 10 Oct 2018 07:43:11 -0300 [thread overview]
Message-ID: <87in2arsjk.fsf@tethera.net> (raw)
In-Reply-To: <20181010055326.19030-1-jb55@jb55.com>
William Casarin <jb55@jb55.com> writes:
>
> lib/database.cc | 3 +++
> lib/index.cc | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lib/database.cc b/lib/database.cc
> index 9cf8062c..0b085b21 100644
> --- a/lib/database.cc
> +++ b/lib/database.cc
> @@ -297,6 +297,9 @@ prefix_t prefix_table[] = {
> { "subject", "XSUBJECT", NOTMUCH_FIELD_EXTERNAL |
> NOTMUCH_FIELD_PROBABILISTIC |
> NOTMUCH_FIELD_PROCESSOR},
> + { "body", "XBODY", NOTMUCH_FIELD_EXTERNAL |
> + NOTMUCH_FIELD_PROBABILISTIC |
> + NOTMUCH_FIELD_PROCESSOR},
> };
>
> static void
> diff --git a/lib/index.cc b/lib/index.cc
> index 3f694387..299b8770 100644
> --- a/lib/index.cc
> +++ b/lib/index.cc
> @@ -506,7 +506,7 @@ _index_mime_part (notmuch_message_t *message,
> body = (char *) g_byte_array_free (byte_array, false);
>
> if (body) {
> - _notmuch_message_gen_terms (message, NULL, body);
> + _notmuch_message_gen_terms (message, "body", body);
>
> free (body);
> }
> --
I think you'll find you broke non-prefixed queries. Does the test suite
still pass? If so, we need more tests. Anyway, if you add a second set
of terms I'd be intersted how much this bloats the index. Ideally with
the performance corpus so we can all reproduce the experiment.
d
next prev parent reply other threads:[~2018-10-10 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 5:53 [PATCH RFC] index: add body: search query term William Casarin
2018-10-10 10:43 ` David Bremner [this message]
2018-10-10 16:34 ` William Casarin
2018-10-10 16:36 ` William Casarin
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=87in2arsjk.fsf@tethera.net \
--to=david@tethera.net \
--cc=jb55@jb55.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).