Module org.apache.lucene.codecs
Class SimpleTextStoredFieldsReader
java.lang.Object
org.apache.lucene.index.StoredFields
org.apache.lucene.codecs.StoredFieldsReader
org.apache.lucene.codecs.simpletext.SimpleTextStoredFieldsReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable
reads plaintext stored fields
FOR RECREATIONAL USE ONLY
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FieldInfosprivate IndexInputprivate long[]private BytesRefBuilderprivate CharsRefBuilder -
Constructor Summary
ConstructorsConstructorDescriptionSimpleTextStoredFieldsReader(long[] offsets, IndexInput in, FieldInfos fieldInfos) SimpleTextStoredFieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks consistency of this reader.clone()voidclose()voiddocument(int n, StoredFieldVisitor visitor) Expert: visits the fields of a stored document, for custom processing/loading of each field.private booleanprivate intparseIntAt(int offset) private voidreadField(BytesRef type, FieldInfo fieldInfo, StoredFieldVisitor visitor) private voidreadIndex(int size) private voidreadLine()toString()Methods inherited from class org.apache.lucene.codecs.StoredFieldsReader
getMergeInstanceMethods inherited from class org.apache.lucene.index.StoredFields
document, document, prefetch
-
Field Details
-
offsets
private long[] offsets -
in
-
scratch
-
scratchUTF16
-
fieldInfos
-
-
Constructor Details
-
SimpleTextStoredFieldsReader
public SimpleTextStoredFieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) throws IOException - Throws:
IOException
-
SimpleTextStoredFieldsReader
SimpleTextStoredFieldsReader(long[] offsets, IndexInput in, FieldInfos fieldInfos)
-
-
Method Details
-
readIndex
- Throws:
IOException
-
document
Description copied from class:StoredFieldsExpert: 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:
documentin classStoredFields- Throws:
IOException
-
readField
private void readField(BytesRef type, FieldInfo fieldInfo, StoredFieldVisitor visitor) throws IOException - Throws:
IOException
-
clone
- Specified by:
clonein classStoredFieldsReader
-
close
- Throws:
IOException
-
readLine
- Throws:
IOException
-
parseIntAt
private int parseIntAt(int offset) -
equalsAt
-
toString
-
checkIntegrity
Description copied from class:StoredFieldsReaderChecks 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:
checkIntegrityin classStoredFieldsReader- Throws:
IOException
-