diff --git a/libsearch/index/document.cpp b/libsearch/index/document.cpp index 95056b8..92cb446 100644 --- a/libsearch/index/document.cpp +++ b/libsearch/index/document.cpp @@ -45,7 +45,7 @@ void Document::setUniqueTerm(QString term) { if(term.isEmpty()) return; -// m_document->add_term(term.toStdString()); + m_document->add_term(term.toStdString()); m_unique_term = new QString(term); } diff --git a/libsearch/index/index-generator.cpp b/libsearch/index/index-generator.cpp index de0a937..488b13a 100644 --- a/libsearch/index/index-generator.cpp +++ b/libsearch/index/index-generator.cpp @@ -56,6 +56,7 @@ bool IndexGenerator::creatAllIndex(QQueue > *messageList) count = 0; m_datebase_path->commit(); } + FileUtils::_current_index_count += 1; } m_datebase_path->commit(); } @@ -353,6 +354,7 @@ bool IndexGenerator::deleteAllIndex(QStringList *pathlist) qDebug()<<"delete path"<commit(); + FileUtils::_current_index_count -= 1; qDebug()<< "--delete finish--"; } catch(const Xapian::Error &e)