Github user jimczi commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/495#discussion_r232311732
--- Diff:
lucene/core/src/java/org/apache/lucene/search/ConstantScoreScorer.java ---
@@ -70,7 +98,7 @@ public TwoPhaseIterator twoPhaseIterator() {
@Override
public int docID() {
- return disi.docID();
+ return twoPhaseIterator != null ?
twoPhaseIterator.approximation().docID() : doc;
--- End diff --
This would introduce introduce a discrepancy between the docID returned by
the scorer and the one returned by the iterator. You need to apply the
indirection to the approximation of the `twoPhaseIterator` as explained
[here](https://github.com/apache/lucene-solr/pull/495#pullrequestreview-173485478).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]