mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
lib: leave stemmer object accessible
This enables using the same stemmer in both query parsers.
This commit is contained in:
parent
be7e83de96
commit
3202e0d1fe
2 changed files with 3 additions and 1 deletions
|
@ -232,6 +232,7 @@ struct _notmuch_database {
|
|||
*/
|
||||
unsigned long view;
|
||||
Xapian::QueryParser *query_parser;
|
||||
Xapian::Stem *stemmer;
|
||||
Xapian::TermGenerator *term_gen;
|
||||
Xapian::RangeProcessor *value_range_processor;
|
||||
Xapian::RangeProcessor *date_range_processor;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue