equal
deleted
inserted
replaced
171 |
171 |
172 QSet<QString> pathSet; |
172 QSet<QString> pathSet; |
173 QCLuceneDocument document; |
173 QCLuceneDocument document; |
174 const QStringList namespaceList = engine.registeredDocumentations(); |
174 const QStringList namespaceList = engine.registeredDocumentations(); |
175 |
175 |
176 foreach (QSharedPointer<QCLuceneHits> hits, cluceneHitsList) { |
176 foreach (const QSharedPointer<QCLuceneHits> &hits, cluceneHitsList) { |
177 for (qint32 i = 0; i < hits->length(); i++) { |
177 for (qint32 i = 0; i < hits->length(); i++) { |
178 document = hits->document(i); |
178 document = hits->document(i); |
179 const QString path = document.get(PathField); |
179 const QString path = document.get(PathField); |
180 if (!pathSet.contains(path) && namespaceList.contains( |
180 if (!pathSet.contains(path) && namespaceList.contains( |
181 document.get(NamespaceField), Qt::CaseInsensitive)) { |
181 document.get(NamespaceField), Qt::CaseInsensitive)) { |
413 } |
413 } |
414 |
414 |
415 void QHelpSearchIndexReaderClucene::boostSearchHits(const QHelpEngineCore &engine, |
415 void QHelpSearchIndexReaderClucene::boostSearchHits(const QHelpEngineCore &engine, |
416 QList<QHelpSearchEngine::SearchHit> &hitList, const QList<QHelpSearchQuery> &queryList) |
416 QList<QHelpSearchEngine::SearchHit> &hitList, const QList<QHelpSearchQuery> &queryList) |
417 { |
417 { |
418 foreach (const QHelpSearchQuery query, queryList) { |
418 foreach (const QHelpSearchQuery &query, queryList) { |
419 if (query.fieldName != QHelpSearchQuery::DEFAULT) |
419 if (query.fieldName != QHelpSearchQuery::DEFAULT) |
420 continue; |
420 continue; |
421 |
421 |
422 QString joinedQuery = query.wordList.join(QLatin1String(" ")); |
422 QString joinedQuery = query.wordList.join(QLatin1String(" ")); |
423 |
423 |