mikemccand commented on code in PR #12900:
URL: https://github.com/apache/lucene/pull/12900#discussion_r1423822953
##########
lucene/core/src/java/org/apache/lucene/codecs/lucene90/blocktree/SegmentTermsEnum.java:
##########
@@ -495,7 +495,7 @@ public boolean seekExact(BytesRef target) throws
IOException {
targetUpto = 0;
outputAccumulator.push(arc.nextFinalOutput());
currentFrame = pushFrame(arc, 0);
- outputAccumulator.pop();
+ outputAccumulator.pop(arc.nextFinalOutput());
Review Comment:
Good catch! And the new check you added in `pop` will prevent this bug,
right?
But I also think this was (luckily!?) not a bug, because this case is when
the `STE` is not yet seek'd to any term, so we are starting at the FST entry
arc / root block, and the empty string FST input must always have a final
output (the "root block"), which will never be `NO_OUTPUT`. Are there any
other places in `STE` where we were blindly popping like this?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]