jpountz commented on code in PR #14709: URL: https://github.com/apache/lucene/pull/14709#discussion_r2107247589
########## lucene/core/src/java/org/apache/lucene/search/TermScorer.java: ########## @@ -134,6 +134,10 @@ public void nextDocsAndScores(int upTo, Bits liveDocs, DocAndScoreBuffer buffer) docAndFreqBuffer = new DocAndFreqBuffer(); } + if (impactsDisi != null) { + impactsDisi.ensureCompetitive(); + } Review Comment: I wonder if we should rather put it at the beginning of the below for loop. For instance, imagine that the first block of docs returned only has deleted docs, then it will fetch a new block. It would be good to check if this block is competitive before fetching this new block as well? -- 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