LUCENE-8412: Fix TestDistributedGrouping failure.

This commit is contained in:
Adrien Grand 2018-07-24 12:10:25 +02:00
parent 8892c0d9af
commit d010cdd87e
1 changed files with 4 additions and 2 deletions

View File

@ -173,8 +173,10 @@ public class TopGroupsFieldCommand implements Command<TopGroups<BytesRef>> {
} else {
topGroups = secondPassCollector.getTopGroups(0);
}
for (GroupDocs<?> group : topGroups.groups) {
TopFieldCollector.populateScores(group.scoreDocs, searcher, query);
if (needScores) {
for (GroupDocs<?> group : topGroups.groups) {
TopFieldCollector.populateScores(group.scoreDocs, searcher, query);
}
}
}