Fix double word can not search;

This commit is contained in:
jixiaoxu 2021-11-02 13:51:02 +08:00 committed by iaom
parent 13b269b989
commit a095150f09
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ void ConstructDocumentForPath::run() {
temp.append(pinyin_text_list)*/; temp.append(pinyin_text_list)*/;
int i = 0; int i = 0;
int postingCount = 1; //terms post of Xapian document is start from 1! int postingCount = 1; //terms post of Xapian document is start from 1!
while(postingCount < index_text.size()) { while(postingCount <= index_text.size()) {
doc.addPosting(QUrl::toPercentEncoding(index_text.at(i)).toStdString(), postingCount); doc.addPosting(QUrl::toPercentEncoding(index_text.at(i)).toStdString(), postingCount);
++postingCount; ++postingCount;
++i; ++i;