diff --git a/libsearch/index/search-manager.cpp b/libsearch/index/search-manager.cpp index 2c64f29..1e4130d 100644 --- a/libsearch/index/search-manager.cpp +++ b/libsearch/index/search-manager.cpp @@ -339,6 +339,10 @@ int FileContentSearch::getResult(Xapian::MSet &result, std::string &keyWord) { for(const QString& wordTobeFound : words) { std::string term = wordTobeFound.toStdString(); termIterator.skip_to(term); + if(termIterator == doc.termlist_end()) { + termIterator = doc.termlist_begin(); + continue; + } if(term == *termIterator) { break; } else {