Some optimization.
This commit is contained in:
parent
bb17943e1d
commit
a6d98d5085
|
@ -27,7 +27,7 @@ QMutex SearchManager::m_mutex1;
|
||||||
QMutex SearchManager::m_mutex2;
|
QMutex SearchManager::m_mutex2;
|
||||||
QMutex SearchManager::m_mutex3;
|
QMutex SearchManager::m_mutex3;
|
||||||
SearchManager::SearchManager(QObject *parent) : QObject(parent) {
|
SearchManager::SearchManager(QObject *parent) : QObject(parent) {
|
||||||
m_pool.setMaxThreadCount(2);
|
m_pool.setMaxThreadCount(3);
|
||||||
m_pool.setExpiryTimeout(1000);
|
m_pool.setExpiryTimeout(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,29 +280,16 @@ int FileContentSearch::keywordSearchContent() {
|
||||||
words.append(sKeyWord.at(i).word).append(" ");
|
words.append(sKeyWord.at(i).word).append(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
Xapian::Query query = qp.parse_query(words);
|
|
||||||
// Xapian::Query query = qp.parse_query(keyword.toStdString());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// QVector<SKeyWord> sKeyWord = ChineseSegmentation::getInstance()->callSegement(keyword);
|
|
||||||
// //Creat a query
|
|
||||||
// std::string words;
|
|
||||||
// for(int i=0;i<sKeyWord.size();i++)
|
|
||||||
// {
|
|
||||||
// words.append(sKeyWord.at(i).word).append(" ");
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// Xapian::Query query = qp.parse_query(words);
|
// Xapian::Query query = qp.parse_query(words);
|
||||||
|
|
||||||
// std::vector<Xapian::Query> v;
|
std::vector<Xapian::Query> v;
|
||||||
// for(int i=0;i<sKeyWord.size();i++)
|
for(int i=0;i<sKeyWord.size();i++)
|
||||||
// {
|
{
|
||||||
// v.push_back(Xapian::Query(sKeyWord.at(i).word));
|
v.push_back(Xapian::Query(sKeyWord.at(i).word));
|
||||||
// qDebug()<<QString::fromStdString(sKeyWord.at(i).word);
|
qDebug()<<QString::fromStdString(sKeyWord.at(i).word);
|
||||||
// }
|
}
|
||||||
// Xapian::Query queryPhrase =Xapian::Query(Xapian::Query::OP_AND, v.begin(), v.end());
|
Xapian::Query query =Xapian::Query(Xapian::Query::OP_AND, v.begin(), v.end());
|
||||||
|
|
||||||
qDebug() << "keywordSearchContent:" << QString::fromStdString(query.get_description());
|
qDebug() << "keywordSearchContent:" << QString::fromStdString(query.get_description());
|
||||||
|
|
||||||
enquire.set_query(query);
|
enquire.set_query(query);
|
||||||
|
|
|
@ -67,7 +67,7 @@ unix {
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
|
||||||
header.path = /usr/include/ukui-search
|
header.path = /usr/include/ukui-search
|
||||||
header.files += *.h index/*.h appsearch/*.h settingsearch/*.h
|
header.files += *.h index/*.h appsearch/*.h settingsearch/*.h plugininterface/*.h
|
||||||
INSTALLS += header
|
INSTALLS += header
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
#include <QPainterPath>
|
||||||
|
|
||||||
namespace Zeeker {
|
namespace Zeeker {
|
||||||
class CreateIndexAskDialog : public QDialog {
|
class CreateIndexAskDialog : public QDialog {
|
||||||
|
|
Loading…
Reference in New Issue