ChrisHegarty commented on issue #13120: URL: https://github.com/apache/lucene/issues/13120#issuecomment-1954031628
I believe that this is a test bug. If you look further up in `doCheckMaxScores`, (in the previous for loop) there is an explicit check for `s2 == null`, which appears to be correct and in fact needed. This should likely be replicated immediately preceding the failing NPE e.g. ```diff --- a/lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java +++ b/lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java @@ -793,6 +793,10 @@ public class CheckHits { assertTrue(s2 == null || s2.iterator().nextDoc() == DocIdSetIterator.NO_MORE_DOCS); continue; } + if (s2 == null) { + assertTrue(s1.iterator().nextDoc() == DocIdSetIterator.NO_MORE_DOCS); + continue; + } TwoPhaseIterator twoPhase1 = s1.twoPhaseIterator(); TwoPhaseIterator twoPhase2 = s2.twoPhaseIterator(); DocIdSetIterator approx1 = twoPhase1 == null ? s1.iterator() : twoPhase1.approximation(); ``` -- 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. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org