lsh1215 commented on code in PR #16300:
URL: https://github.com/apache/lucene/pull/16300#discussion_r3546559333


##########
lucene/core/src/test/org/apache/lucene/search/TestTermInSetQuery.java:
##########
@@ -284,17 +289,30 @@ public void testSkipperOptimizationGapAssumption() throws 
IOException {
   private void assertSameMatches(IndexSearcher searcher, Query q1, Query q2, 
boolean scores)
       throws IOException {
     final int maxDoc = searcher.getIndexReader().maxDoc();
-    final TopDocs td1 = searcher.search(q1, maxDoc, scores ? Sort.RELEVANCE : 
Sort.INDEXORDER);
-    final TopDocs td2 = searcher.search(q2, maxDoc, scores ? Sort.RELEVANCE : 
Sort.INDEXORDER);
-    assertEquals(td1.totalHits.value(), td2.totalHits.value());
-    for (int i = 0; i < td1.scoreDocs.length; ++i) {
-      assertEquals(td1.scoreDocs[i].doc, td2.scoreDocs[i].doc);
-      if (scores) {
+    if (scores) {
+      final TopDocs td1 = searcher.search(q1, maxDoc);

Review Comment:
   Thanks, that's a good point.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to