diff --git a/src/common/kiwix/searcher.cpp b/src/common/kiwix/searcher.cpp index 8b69c5d8f..f59056a54 100644 --- a/src/common/kiwix/searcher.cpp +++ b/src/common/kiwix/searcher.cpp @@ -29,17 +29,12 @@ namespace kiwix { this->results.clear(); this->resultOffset = this->results.begin(); + /* Create the query */ + Xapian::QueryParser queryParser; + Xapian::Query query = queryParser.parse_query(removeAccents(search)); + /* Create the enquire object */ Xapian::Enquire enquire(this->readableDatabase); - - /* Create the query term vector */ - /* I have the doublequote " because bug ID: 2939690 */ - std::vector queryTerms = split(removeAccents(search), " #@%$0/\\_-*()[]{},;:\"'"); - - /* Create query object */ - Xapian::Query query(Xapian::Query::OP_OR, queryTerms.begin(), queryTerms.end()); - - /* Set the query in the enquire object */ enquire.set_query(query); if (verbose == true) { diff --git a/src/common/kiwix/searcher.h b/src/common/kiwix/searcher.h index b62c573d8..ebbd4d408 100644 --- a/src/common/kiwix/searcher.h +++ b/src/common/kiwix/searcher.h @@ -11,7 +11,6 @@ #include #include #include -#include using namespace std;