jpountz commented on a change in pull request #1952:
URL: https://github.com/apache/lucene-solr/pull/1952#discussion_r500372658
##########
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:
I don't think that this is good enough as we might be advancing ahead of
scorerIterator? This was why I thought that we should instead wrap
scorerIterator in such a way that its initial docID would be -1.
----------------------------------------------------------------
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]