Class SimpleTextDocValuesReader
- java.lang.Object
-
- org.apache.lucene.codecs.DocValuesProducer
-
- org.apache.lucene.codecs.simpletext.SimpleTextDocValuesReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Accountable
class SimpleTextDocValuesReader extends DocValuesProducer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSimpleTextDocValuesReader.DocValuesIterator(package private) static classSimpleTextDocValuesReader.OneField
-
Field Summary
Fields Modifier and Type Field Description private static longBASE_RAM_BYTES_USED(package private) IndexInputdata(package private) java.util.Map<java.lang.String,SimpleTextDocValuesReader.OneField>fields(package private) intmaxDoc(package private) BytesRefBuilderscratch-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description SimpleTextDocValuesReader(SegmentReadState state, java.lang.String ext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckIntegrity()Checks consistency of this producervoidclose()BinaryDocValuesgetBinary(FieldInfo fieldInfo)ReturnsBinaryDocValuesfor this field.private SimpleTextDocValuesReader.DocValuesIteratorgetBinaryDocsWithField(FieldInfo fieldInfo)NumericDocValuesgetNumeric(FieldInfo fieldInfo)ReturnsNumericDocValuesfor this field.private SimpleTextDocValuesReader.DocValuesIteratorgetNumericDocsWithField(FieldInfo fieldInfo)(package private) java.util.function.IntFunction<java.lang.Long>getNumericNonIterator(FieldInfo fieldInfo)SortedDocValuesgetSorted(FieldInfo fieldInfo)ReturnsSortedDocValuesfor this field.SortedNumericDocValuesgetSortedNumeric(FieldInfo field)ReturnsSortedNumericDocValuesfor this field.SortedSetDocValuesgetSortedSet(FieldInfo fieldInfo)ReturnsSortedSetDocValuesfor this field.longramBytesUsed()Return the memory usage of this object in bytes.private voidreadLine()Used only in ctor:private booleanstartsWith(BytesRef prefix)Used only in ctor:private java.lang.StringstripPrefix(BytesRef prefix)Used only in ctor:java.lang.StringtoString()-
Methods inherited from class org.apache.lucene.codecs.DocValuesProducer
getMergeInstance
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Field Detail
-
BASE_RAM_BYTES_USED
private static final long BASE_RAM_BYTES_USED
-
maxDoc
final int maxDoc
-
data
final IndexInput data
-
scratch
final BytesRefBuilder scratch
-
fields
final java.util.Map<java.lang.String,SimpleTextDocValuesReader.OneField> fields
-
-
Constructor Detail
-
SimpleTextDocValuesReader
public SimpleTextDocValuesReader(SegmentReadState state, java.lang.String ext) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getNumeric
public NumericDocValues getNumeric(FieldInfo fieldInfo) throws java.io.IOException
Description copied from class:DocValuesProducerReturnsNumericDocValuesfor this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Specified by:
getNumericin classDocValuesProducer- Throws:
java.io.IOException
-
getNumericNonIterator
java.util.function.IntFunction<java.lang.Long> getNumericNonIterator(FieldInfo fieldInfo) throws java.io.IOException
- Throws:
java.io.IOException
-
getNumericDocsWithField
private SimpleTextDocValuesReader.DocValuesIterator getNumericDocsWithField(FieldInfo fieldInfo) throws java.io.IOException
- Throws:
java.io.IOException
-
getBinary
public BinaryDocValues getBinary(FieldInfo fieldInfo) throws java.io.IOException
Description copied from class:DocValuesProducerReturnsBinaryDocValuesfor this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Specified by:
getBinaryin classDocValuesProducer- Throws:
java.io.IOException
-
getBinaryDocsWithField
private SimpleTextDocValuesReader.DocValuesIterator getBinaryDocsWithField(FieldInfo fieldInfo) throws java.io.IOException
- Throws:
java.io.IOException
-
getSorted
public SortedDocValues getSorted(FieldInfo fieldInfo) throws java.io.IOException
Description copied from class:DocValuesProducerReturnsSortedDocValuesfor this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Specified by:
getSortedin classDocValuesProducer- Throws:
java.io.IOException
-
getSortedNumeric
public SortedNumericDocValues getSortedNumeric(FieldInfo field) throws java.io.IOException
Description copied from class:DocValuesProducerReturnsSortedNumericDocValuesfor this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Specified by:
getSortedNumericin classDocValuesProducer- Throws:
java.io.IOException
-
getSortedSet
public SortedSetDocValues getSortedSet(FieldInfo fieldInfo) throws java.io.IOException
Description copied from class:DocValuesProducerReturnsSortedSetDocValuesfor this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Specified by:
getSortedSetin classDocValuesProducer- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
readLine
private void readLine() throws java.io.IOExceptionUsed only in ctor:- Throws:
java.io.IOException
-
startsWith
private boolean startsWith(BytesRef prefix)
Used only in ctor:
-
stripPrefix
private java.lang.String stripPrefix(BytesRef prefix)
Used only in ctor:
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
checkIntegrity
public void checkIntegrity() throws java.io.IOExceptionDescription copied from class:DocValuesProducerChecks consistency of this producerNote 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 classDocValuesProducer- Throws:
java.io.IOException
-
-