diff options
| author | David Bremner <david@tethera.net> | 2021-08-24 08:17:17 -0700 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-09-04 17:07:19 -0700 |
| commit | 3202e0d1feba1ab955ba1c07098c00208f8f0ada (patch) | |
| tree | 0dce391dfbcac791734debe15e598b40db6e3bf2 /lib/open.cc | |
| parent | be7e83de96b706af418fc9f139ded4d50bf342f6 (diff) | |
lib: leave stemmer object accessible
This enables using the same stemmer in both query parsers.
Diffstat (limited to 'lib/open.cc')
| -rw-r--r-- | lib/open.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/open.cc b/lib/open.cc index 280ffee3..8a835e98 100644 --- a/lib/open.cc +++ b/lib/open.cc @@ -432,7 +432,8 @@ _finish_open (notmuch_database_t *notmuch, "lastmod:"); notmuch->query_parser->set_default_op (Xapian::Query::OP_AND); notmuch->query_parser->set_database (*notmuch->xapian_db); - notmuch->query_parser->set_stemmer (Xapian::Stem ("english")); + notmuch->stemmer = new Xapian::Stem ("english"); + notmuch->query_parser->set_stemmer (*notmuch->stemmer); notmuch->query_parser->set_stemming_strategy (Xapian::QueryParser::STEM_SOME); notmuch->query_parser->add_rangeprocessor (notmuch->value_range_processor); notmuch->query_parser->add_rangeprocessor (notmuch->date_range_processor); |
