Class SimpleTextStoredFieldsReader
- java.lang.Object
-
- org.apache.lucene.codecs.StoredFieldsReader
-
- org.apache.lucene.codecs.simpletext.SimpleTextStoredFieldsReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Cloneable
public class SimpleTextStoredFieldsReader extends StoredFieldsReader
reads plaintext stored fieldsFOR RECREATIONAL USE ONLY
-
-
Field Summary
Fields Modifier and Type Field Description private FieldInfos
fieldInfos
private IndexInput
in
private long[]
offsets
private BytesRefBuilder
scratch
private CharsRefBuilder
scratchUTF16
-
Constructor Summary
Constructors Constructor Description SimpleTextStoredFieldsReader(long[] offsets, IndexInput in, FieldInfos fieldInfos)
SimpleTextStoredFieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkIntegrity()
Checks consistency of this reader.StoredFieldsReader
clone()
void
close()
private boolean
equalsAt(BytesRef a, BytesRef b, int bOffset)
private int
parseIntAt(int offset)
private void
readField(BytesRef type, FieldInfo fieldInfo, StoredFieldVisitor visitor)
private void
readIndex(int size)
private void
readLine()
java.lang.String
toString()
void
visitDocument(int n, StoredFieldVisitor visitor)
Visit the stored fields for documentdocID
-
Methods inherited from class org.apache.lucene.codecs.StoredFieldsReader
getMergeInstance
-
-
-
-
Field Detail
-
offsets
private long[] offsets
-
in
private IndexInput in
-
scratch
private BytesRefBuilder scratch
-
scratchUTF16
private CharsRefBuilder scratchUTF16
-
fieldInfos
private final FieldInfos fieldInfos
-
-
Constructor Detail
-
SimpleTextStoredFieldsReader
public SimpleTextStoredFieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context) throws java.io.IOException
- Throws:
java.io.IOException
-
SimpleTextStoredFieldsReader
SimpleTextStoredFieldsReader(long[] offsets, IndexInput in, FieldInfos fieldInfos)
-
-
Method Detail
-
readIndex
private void readIndex(int size) throws java.io.IOException
- Throws:
java.io.IOException
-
visitDocument
public void visitDocument(int n, StoredFieldVisitor visitor) throws java.io.IOException
Description copied from class:StoredFieldsReader
Visit the stored fields for documentdocID
- Specified by:
visitDocument
in classStoredFieldsReader
- Throws:
java.io.IOException
-
readField
private void readField(BytesRef type, FieldInfo fieldInfo, StoredFieldVisitor visitor) throws java.io.IOException
- Throws:
java.io.IOException
-
clone
public StoredFieldsReader clone()
- Specified by:
clone
in classStoredFieldsReader
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
readLine
private void readLine() throws java.io.IOException
- Throws:
java.io.IOException
-
parseIntAt
private int parseIntAt(int offset)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
checkIntegrity
public void checkIntegrity() throws java.io.IOException
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:
java.io.IOException
-
-