jpountz commented on a change in pull request #1952:
URL: https://github.com/apache/lucene-solr/pull/1952#discussion_r500453140



##########
File path: lucene/core/src/java/org/apache/lucene/search/Weight.java
##########
@@ -204,9 +204,14 @@ public int score(LeafCollector collector, Bits acceptDocs, 
int min, int max) thr
       collector.setScorer(scorer);
       DocIdSetIterator scorerIterator = twoPhase == null ? iterator : 
twoPhase.approximation();
       DocIdSetIterator collectorIterator = collector.competitiveIterator();
-      // if possible filter scorerIterator to keep only competitive docs as 
defined by collector
-      DocIdSetIterator filteredIterator = collectorIterator == null ? 
scorerIterator :
-          ConjunctionDISI.intersectIterators(Arrays.asList(scorerIterator, 
collectorIterator));
+      DocIdSetIterator filteredIterator = scorerIterator;
+      if (collectorIterator != null) {
+        if (scorerIterator.docID() != -1) {
+          collectorIterator.advance(scorerIterator.docID());
+        }

Review comment:
       oh, I had not considered setting `scorerIterator.docID()` as a min 
docID, maybe this means that we no longer need the `min` parameter of 
`RangeDISIWrapper`?




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



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

Reply via email to