+ Fix unstable fulltext library search

This commit is contained in:
Kelson42 2014-09-20 16:05:19 +02:00
parent 517a02b814
commit bc161034c1
1 changed files with 2 additions and 1 deletions

View File

@ -512,7 +512,8 @@ namespace kiwix {
if (ok == true && !publisher.empty() && itr->publisher != publisher)
ok = false;
if ((ok == true && !search.empty()) && !(matchRegex(itr->title, search) || matchRegex(itr->description, search)))
if ((ok == true && !search.empty()) && !(matchRegex(itr->title, "\\Q" + search + "\\E") ||
matchRegex(itr->description, "\\Q" + search + "\\E")))
ok = false;
if (ok == true) {