gsmiller commented on code in PR #12334: URL: https://github.com/apache/lucene/pull/12334#discussion_r1206813319
########## lucene/core/src/java/org/apache/lucene/search/comparators/NumericComparator.java: ########## @@ -204,13 +200,21 @@ private void updateCompetitiveIterator() throws IOException { return; } if (reverse == false) { - encodeBottom(maxValueAsBytes); + if (queueFull) { // bottom is avilable only when queue is full + maxValueAsBytes = maxValueAsBytes == null ? new byte[bytesCount] : maxValueAsBytes; Review Comment: Do we need the lazy initialization? I thought `topValueSet` would already be set before the `NumericLeafComparator` gets constructed. Maybe I'm misunderstanding that? -- 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