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


##########
lucene/core/src/java/org/apache/lucene/index/TermsEnum.java:
##########
@@ -61,6 +62,15 @@ 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.
+   */
+  public void prepareSeekExact(BytesRef text) throws IOException {}

Review Comment:
   Can we look into subclasses such as `FilterLeafReader.FilterTermsEnum` to 
make sure this new method behaves correctly?



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