From 0016c79c4660655d5f6a332dc9d55b52d6020a27 Mon Sep 17 00:00:00 2001 From: zhouhui Date: Thu, 11 Apr 2024 20:04:27 +0800 Subject: [PATCH] Remove unnecessary calculating for termLen. (#13291) --- .../codecs/lucene90/blocktree/SegmentTermsEnumFrame.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/blocktree/SegmentTermsEnumFrame.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/blocktree/SegmentTermsEnumFrame.java index 11e88c24b02..5c8b9589691 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/blocktree/SegmentTermsEnumFrame.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/blocktree/SegmentTermsEnumFrame.java @@ -767,7 +767,6 @@ final class SegmentTermsEnumFrame { // ToStringUtils.bytesRefToString(suffixBytesRef)); // } - final int termLen = prefix + suffix; startBytePos = suffixesReader.getPosition(); suffixesReader.skipBytes(suffix); ste.termExists = (code & 1) == 0; @@ -806,7 +805,7 @@ final class SegmentTermsEnumFrame { // us to position to the next term after // the target, so we must recurse into the // sub-frame(s): - ste.currentFrame = ste.pushFrame(null, ste.currentFrame.lastSubFP, termLen); + ste.currentFrame = ste.pushFrame(null, ste.currentFrame.lastSubFP, prefix + suffix); ste.currentFrame.loadBlock(); while (ste.currentFrame.next()) { ste.currentFrame = ste.pushFrame(null, ste.currentFrame.lastSubFP, ste.term.length());