jpountz commented on code in PR #13359: URL: https://github.com/apache/lucene/pull/13359#discussion_r1609878850
########## lucene/core/src/java/org/apache/lucene/index/TermsEnum.java: ########## @@ -61,6 +62,21 @@ public enum SeekStatus { */ public abstract boolean seekExact(BytesRef text) throws IOException; + /** + * Prepare a future call to {@link #seekExact}. This typically calls {@link IndexInput#prefetch} + * on the right range of bytes under the hood so that the next call to {@link #seekExact} is + * faster. This can be used to parallelize I/O across multiple terms by calling {@link + * #prepareSeekExact} on multiple terms enums before calling {@link #seekExact(BytesRef)} on the + * same {@link TermsEnum}s. + * + * <p><b>NOTE</b>: The terms enum is unpositioned after calling this method. + * + * <p><b>NOTE</b>: It is not necessary to call this method before calling {@link + * #seekExact(BytesRef, TermState)}. {@link TermsEnum} implementations are expected to implement + * this method in an I/O-free fashion. Review Comment: Hmm actually I mean `prepareSeekExact` when I say `this method`. I'll replace `this method` with `prepareSeekExact` to avoid ambiguity -- 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