Suggestions now use xapian database when available.

If a embedded fulltext database is present, suggestion will search in it :
 - insensitive case search.
 - search for terms in the middle of the title.
 - xapian will try to complete the last word of the query (as if a '*'
   were added at the end)
This commit is contained in:
Matthieu Gautier
2017-07-11 17:13:21 +02:00
parent 57720ca57b
commit d0371cd133
3 changed files with 51 additions and 5 deletions

View File

@ -61,6 +61,7 @@ class Searcher
unsigned int resultStart,
unsigned int resultEnd,
const bool verbose = false);
void suggestions(std::string& search, const bool verbose = false);
Result* getNextResult();
void restart_search();
unsigned int getEstimatedResultCount();