HUSTERGS commented on code in PR #14906: URL: https://github.com/apache/lucene/pull/14906#discussion_r2188840379
########## lucene/core/src/java/org/apache/lucene/search/ScorerUtil.java: ########## @@ -157,11 +157,10 @@ static void filterCompetitiveHits( int newSize = 0; for (int i = 0; i < buffer.size; ++i) { - if (buffer.scores[i] >= minRequiredScore) { - buffer.docs[newSize] = buffer.docs[i]; - buffer.scores[newSize] = buffer.scores[i]; - newSize++; - } + int inc = buffer.scores[i] >= minRequiredScore ? 1 : 0; + buffer.docs[newSize] = buffer.docs[i]; + buffer.scores[newSize] = buffer.scores[i]; + newSize += inc; Review Comment: Thank you ! That make sense to me. -- 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