You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/09/23 10:46:16 UTC

[GitHub] [lucene-solr] jimczi commented on a change in pull request #1903: Fix bug in sort optimization

jimczi commented on a change in pull request #1903:
URL: https://github.com/apache/lucene-solr/pull/1903#discussion_r493439005



##########
File path: lucene/core/src/test/org/apache/lucene/search/TestFieldSortOptimizationSkipping.java
##########
@@ -432,7 +439,48 @@ public void testDocSortOptimization() throws IOException {
       assertTrue(topDocs.totalHits.value < 10); // assert that very few docs were collected
     }
 
+    reader.close();
+    dir.close();
+  }
+
+  /**
+   * Test that sorting on _doc works correctly.
+   * This test goes through DefaultBulkSorter::scoreRange, where scorerIterator is BitSetIterator.
+   * As a conjunction of this BitSetIterator with DocComparator's iterator, we get BitSetConjunctionDISI.
+   * BitSetConjuctionDISI advances based on the DocComparator's iterator, and doesn't consider
+   * that its BitSetIterator may have advanced passed a certain doc. 

Review comment:
       Should we consider this a bug in `BitSetIterator` ?




----------------------------------------------------------------
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.

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



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