Skip to content

Commit

Permalink
Address Adrien's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mayya-sharipova committed Oct 6, 2020
1 parent cba6cf7 commit d42c464
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lucene/core/src/java/org/apache/lucene/search/Weight.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public int score(LeafCollector collector, Bits acceptDocs, int min, int max) thr
} else {
if (scorerIterator.docID() != -1) {
// Wrap ScorerIterator to start from -1 for conjunction
scorerIterator = new RangeDISIWrapper(scorerIterator, scorerIterator.docID(), max);
scorerIterator = new RangeDISIWrapper(scorerIterator, max);
}
// filter scorerIterator to keep only competitive docs as defined by collector
filteredIterator = ConjunctionDISI.intersectIterators(Arrays.asList(scorerIterator, collectorIterator));
Expand Down Expand Up @@ -283,9 +283,9 @@ protected static class RangeDISIWrapper extends DocIdSetIterator {
private final int max;
private int docID = -1;

public RangeDISIWrapper(DocIdSetIterator in, int min, int max) {
public RangeDISIWrapper(DocIdSetIterator in, int max) {
this.in = in;
this.min = min;
this.min = in.docID();
this.max = max;
}

Expand Down

0 comments on commit d42c464

Please sign in to comment.