This commit is contained in:
Andrea Cavalli 2021-07-05 18:55:11 +02:00
parent 00ff36836e
commit 545c7111de

View File

@ -67,6 +67,7 @@ class TopDocsSearcher {
int topDocsStartOffset, int topDocsStartOffset,
int topDocsHowMany) throws IOException { int topDocsHowMany) throws IOException {
TopDocsCollector<?> collector = getTopDocsCollector(luceneSort, limit, after, totalHitsThreshold); TopDocsCollector<?> collector = getTopDocsCollector(luceneSort, limit, after, totalHitsThreshold);
indexSearcher.search(query, collector);
TopDocs topDocs = collector.topDocs(topDocsStartOffset, topDocsHowMany); TopDocs topDocs = collector.topDocs(topDocsStartOffset, topDocsHowMany);
if (doDocScores) { if (doDocScores) {
TopFieldCollector.populateScores(topDocs.scoreDocs, indexSearcher, query); TopFieldCollector.populateScores(topDocs.scoreDocs, indexSearcher, query);