Class SimpleTextStoredFieldsReader
java.lang.Object
org.apache.lucene.codecs.StoredFieldsReader
org.apache.lucene.codecs.simpletext.SimpleTextStoredFieldsReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable,Accountable
reads plaintext stored fields
FOR RECREATIONAL USE ONLY
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate final FieldInfosprivate IndexInputprivate long[]private BytesRefBuilderprivate CharsRefBuilderFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
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()private booleanprivate intparseIntAt(int offset) longReturn the memory usage of this object in bytes.private voidreadField(BytesRef type, FieldInfo fieldInfo, StoredFieldVisitor visitor) private voidreadIndex(int size) private voidreadLine()toString()voidvisitDocument(int n, StoredFieldVisitor visitor) Visit the stored fields for documentdocIDMethods inherited from class org.apache.lucene.codecs.StoredFieldsReader
getMergeInstanceMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Field Details
-
BASE_RAM_BYTES_USED
private static final long BASE_RAM_BYTES_USED -
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:StoredFieldsReaderVisit the stored fields for documentdocID- Specified by:
visitDocumentin classStoredFieldsReader- 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
-
ramBytesUsed
public long ramBytesUsed()Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal. -
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
-