Use the language stored in the database to configure the queryparser.

To properly search in the xapian database, we need a stemmer using the
same language that the one used during the indexing.
This commit is contained in:
Matthieu Gautier
2017-03-27 18:33:42 +02:00
parent 46fab22a73
commit 998db0eb2b
2 changed files with 28 additions and 3 deletions

View File

@ -70,9 +70,12 @@ namespace kiwix {
protected:
void closeIndex();
void openIndex(const string &xapianDirectoryPath);
void setup_queryParser();
Reader* reader;
Xapian::Database readableDatabase;
std::string language;
Xapian::QueryParser queryParser;
Xapian::Stem stemmer;
Xapian::MSet results;
Xapian::MSetIterator current_result;