vsop-479 commented on code in PR #13192:
URL: https://github.com/apache/lucene/pull/13192#discussion_r1543119650


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene90/blocktree/SegmentTermsEnumFrame.java:
##########
@@ -196,6 +207,90 @@ void loadBlock() throws IOException {
     suffixLengthsReader.reset(suffixLengthBytes, 0, numSuffixLengthBytes);
     totalSuffixBytes = ste.in.getFilePointer() - startSuffixFP;
 
+    // Prepare suffixes, offsets to binary search.
+    if (allEqual) {
+      if (isLeafBlock) {
+        suffix = suffixLengthsReader.readVInt();
+      } else {
+        // Handle subCode for non leaf block.
+        postions = new int[entCount];

Review Comment:
   Yes, maybe it is less worth to implement this binary search to non-leaf 
blocks (both `allEqual` and non-`allEqual` ?).
   
   Can we just take this change to non-`allEqual` leaf blocks? But it still 
need to allocate `suffixes ` and `offsets` ( assume We don't need `positions` 
to set `suffixLengthsReader`'s position after searching a block).



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