Module org.apache.lucene.core
Package org.apache.lucene.index
Class SlowCompositeCodecReaderWrapper.SlowCompositeStoredFieldsReaderWrapper
java.lang.Object
org.apache.lucene.index.StoredFields
org.apache.lucene.codecs.StoredFieldsReader
org.apache.lucene.index.SlowCompositeCodecReaderWrapper.SlowCompositeStoredFieldsReaderWrapper
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Cloneable
- Enclosing class:
SlowCompositeCodecReaderWrapper
private class SlowCompositeCodecReaderWrapper.SlowCompositeStoredFieldsReaderWrapper
extends StoredFieldsReader
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSlowCompositeStoredFieldsReaderWrapper
(StoredFieldsReader[] readers, int[] docStarts) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks consistency of this reader.clone()
void
close()
void
document
(int docID, StoredFieldVisitor visitor) Expert: visits the fields of a stored document, for custom processing/loading of each field.void
prefetch
(int docID) Optional method: Give a hint to thisStoredFields
instance that the given document will be read in the near future.Methods inherited from class org.apache.lucene.codecs.StoredFieldsReader
getMergeInstance
Methods inherited from class org.apache.lucene.index.StoredFields
document, document
-
Field Details
-
readers
-
docStarts
private final int[] docStarts
-
-
Constructor Details
-
SlowCompositeStoredFieldsReaderWrapper
SlowCompositeStoredFieldsReaderWrapper(StoredFieldsReader[] readers, int[] docStarts)
-
-
Method Details
-
close
- Throws:
IOException
-
clone
- Specified by:
clone
in classStoredFieldsReader
-
checkIntegrity
Description copied from class:StoredFieldsReader
Checks consistency of this reader.Note that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.
- Specified by:
checkIntegrity
in classStoredFieldsReader
- Throws:
IOException
-
prefetch
Description copied from class:StoredFields
Optional method: Give a hint to thisStoredFields
instance that the given document will be read in the near future. This typically delegates toIndexInput.prefetch(long, long)
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
StoredFields.prefetch(int)
andStoredFields.document(int)
in batches instead of prefetching all documents up-front.- Overrides:
prefetch
in classStoredFields
- Throws:
IOException
-
document
Description copied from class:StoredFields
Expert: visits the fields of a stored document, for custom processing/loading of each field. If you simply want to load all fields, useStoredFields.document(int)
. If you want to load a subset, useDocumentStoredFieldVisitor
.- Specified by:
document
in classStoredFields
- Throws:
IOException
-