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


##########
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:
   `this method` -> `that method`?  Since I think you mean `seekExact(BytesRef, 
TermState)` when you say `this method` here (but the previous `this method` two 
lines up is referring to `prepareSeekExact`)?  Pronouns are hard!



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