Class SimpleTextStoredFieldsReader
java.lang.Object
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 FieldInfos
private IndexInput
private long[]
private BytesRefBuilder
private CharsRefBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleTextStoredFieldsReader
(long[] offsets, IndexInput in, FieldInfos fieldInfos) SimpleTextStoredFieldsReader
(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks consistency of this reader.clone()
void
close()
private boolean
private int
parseIntAt
(int offset) private void
readField
(BytesRef type, FieldInfo fieldInfo, StoredFieldVisitor visitor) private void
readIndex
(int size) private void
readLine()
toString()
void
visitDocument
(int n, StoredFieldVisitor visitor) Visit the stored fields for documentdocID
Methods inherited from class org.apache.lucene.codecs.StoredFieldsReader
getMergeInstance
-
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
-
visitDocument
Description copied from class:StoredFieldsReader
Visit the stored fields for documentdocID
- Specified by:
visitDocument
in classStoredFieldsReader
- Throws:
IOException
-
readField
private void readField(BytesRef type, FieldInfo fieldInfo, StoredFieldVisitor visitor) throws IOException - Throws:
IOException
-
clone
- Specified by:
clone
in classStoredFieldsReader
-
close
- Throws:
IOException
-
readLine
- Throws:
IOException
-
parseIntAt
private int parseIntAt(int offset) -
equalsAt
-
toString
-
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
-