gashutos commented on code in PR #12334:
URL: https://github.com/apache/lucene/pull/12334#discussion_r1206958937


##########
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:
   We dont know upfront at the time of construction (where currently 
initialization is done) that would we be needing maxValueAsBytes & 
minValuesAsBytes both. Like about the case, where we dont have any competitive 
hit collected in queue hence no bottom but has ```after``` value so the 
topValue.



-- 
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

Reply via email to