jpountz commented on code in PR #13359:
URL: https://github.com/apache/lucene/pull/13359#discussion_r1609822235


##########
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.

Review Comment:
   Indeed, I'm trying to reserve the right to update the state of the terms 
enum through this API in the future. See also 
`AssertingTermsEnum#prepareSeekExact`.



-- 
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

Reply via email to