vsop-479 commented on code in PR #13253: URL: https://github.com/apache/lucene/pull/13253#discussion_r1613171816
########## lucene/core/src/java/org/apache/lucene/codecs/lucene90/blocktree/SegmentTermsEnum.java: ########## @@ -434,8 +436,29 @@ public boolean seekExact(BytesRef target) throws IOException { // System.out.println(" target is before current (shares prefixLen=" + targetUpto + "); // rewind frame ord=" + lastFrame.ord); // } + + // We got lastFrame by comparing target and term, and target less than last seeked term in + // currentFrame. If lastFrame's fp is same with currentFrame's fp, we can reduce entCount to + // nextEnt. + boolean currentIsLast = currentFrame.fp == lastFrame.fp; currentFrame = lastFrame; - currentFrame.rewind(); + + // Only rewindWithoutReload for non-floor block or first floor block. + // TODO: We need currentFrame's first entry to judge whether we can rewindWithoutReload for + // non-first floor blocks. + if (currentFrame.fp != currentFrame.fpOrig Review Comment: Maybe `currentFrame.nextEnt == -1` is enough for both unloaded or rewinded block, I will confirm 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