From a6d98d5085dd72f5070dddfbc1221d254b0f1bc1 Mon Sep 17 00:00:00 2001 From: iaom <18504285112@163.com> Date: Fri, 28 May 2021 14:22:17 +0800 Subject: [PATCH] Some optimization. --- libsearch/index/search-manager.cpp | 31 +++++++++--------------------- libsearch/libsearch.pro | 2 +- src/create-index-ask-dialog.h | 1 + 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/libsearch/index/search-manager.cpp b/libsearch/index/search-manager.cpp index ce75385..fa28e8a 100644 --- a/libsearch/index/search-manager.cpp +++ b/libsearch/index/search-manager.cpp @@ -27,7 +27,7 @@ QMutex SearchManager::m_mutex1; QMutex SearchManager::m_mutex2; QMutex SearchManager::m_mutex3; SearchManager::SearchManager(QObject *parent) : QObject(parent) { - m_pool.setMaxThreadCount(2); + m_pool.setMaxThreadCount(3); m_pool.setExpiryTimeout(1000); } @@ -280,29 +280,16 @@ int FileContentSearch::keywordSearchContent() { words.append(sKeyWord.at(i).word).append(" "); } - Xapian::Query query = qp.parse_query(words); -// Xapian::Query query = qp.parse_query(keyword.toStdString()); - - - -// QVector sKeyWord = ChineseSegmentation::getInstance()->callSegement(keyword); -// //Creat a query -// std::string words; -// for(int i=0;i v; - // for(int i=0;i v; + for(int i=0;i #include #include +#include namespace Zeeker { class CreateIndexAskDialog : public QDialog {