benwtrent opened a new pull request, #15380: URL: https://github.com/apache/lucene/pull/15380
When we utilize the underlying approximation here, its possible that its provided by a TwoPhase iterator. Meaning, we never actually call `matches()` after advancing the approximation and thus the two can get out of sync. This can result in EOFs as described in the related issue. The other way I could see to fix this is to force calling `matches()` on every item in the essential queue later in the while loop. However, since this was the ONLY place in all of `MaxScoreBulkScorer` that used the approximation for the scorers, I opted to just not use it and use an iterator. I welcome discussion, this took a long time to figure out as this part of the code is very interdependent with various other parts of the code :/ and have had many changes over the last couple of minor releases. Still working on a test...maybe we should add assertions to the TwoPhase iterator that ensures `matches` is called...I am not sure. closes: https://github.com/apache/lucene/issues/15324 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
