From 83f1b904ad5f4a7e3dd3e67fd47a5937fe80f340 Mon Sep 17 00:00:00 2001 From: iaom Date: Wed, 30 Nov 2022 16:19:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=87=E4=BB=B6=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=90=9C=E7=B4=A2=E8=AF=A6=E6=83=85=E9=A1=B5=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=95=B0=E6=8D=AE=E6=97=B6=E5=81=B6=E7=8E=B0=E7=9A=84?= =?UTF-8?q?=E5=B4=A9=E6=BA=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libsearch/index/search-manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 {