prefetch

open override fun prefetch(docID: Int)

Optional method: Give a hint to this StoredFields instance that the given document will be read in the near future. This typically delegates to IndexInput.prefetch and is useful to parallelize I/O across multiple documents.

NOTE: This API is expected to be called on a small enough set of doc IDs that they could all fit in the page cache. If you plan on retrieving a very large number of documents, it may be a good idea to perform calls to .prefetch and .document in batches instead of prefetching all documents up-front.