jpountz commented on a change in pull request #763:
URL: https://github.com/apache/lucene/pull/763#discussion_r838607150



##########
File path: 
lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java
##########
@@ -634,12 +694,13 @@ public static void checkTopScores(Random random, Query 
query, IndexSearcher sear
 
   private static void doCheckTopScores(Query query, IndexSearcher searcher, 
int numHits)
       throws IOException {
-    TopScoreDocCollector collector1 =
-        TopScoreDocCollector.create(numHits, null, Integer.MAX_VALUE); // 
COMPLETE
-    TopScoreDocCollector collector2 = TopScoreDocCollector.create(numHits, 
null, 1); // TOP_SCORES
-    searcher.search(query, collector1);
-    searcher.search(query, collector2);
-    checkEqual(query, collector1.topDocs().scoreDocs, 
collector2.topDocs().scoreDocs);
+    CollectorManager<TopScoreDocCollector, TopDocs> complete =
+        TopScoreDocCollector.createSharedManager(numHits, null, 
Integer.MAX_VALUE);
+    ScoreDoc[] completeScoreDocs = searcher.search(query, complete).scoreDocs;
+    CollectorManager<TopScoreDocCollector, TopDocs> topScores =
+        TopScoreDocCollector.createSharedManager(numHits, null, 1);

Review comment:
       Can you keep the "COMPLETE" / "TOP_SCORES" comments that indicate the 
ScoreMode that gets used for these various collectors?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to