Skip to content

Commit

Permalink
Remove unnecessary calculating for termLen. (apache#13291)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsop-479 authored Apr 11, 2024
1 parent f44ded0 commit 0016c79
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,6 @@ public SeekStatus scanToTermNonLeaf(BytesRef target, boolean exactOnly) throws I
// ToStringUtils.bytesRefToString(suffixBytesRef));
// }

final int termLen = prefix + suffix;
startBytePos = suffixesReader.getPosition();
suffixesReader.skipBytes(suffix);
ste.termExists = (code & 1) == 0;
Expand Down Expand Up @@ -806,7 +805,7 @@ public SeekStatus scanToTermNonLeaf(BytesRef target, boolean exactOnly) throws I
// 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());
Expand Down

0 comments on commit 0016c79

Please sign in to comment.