Module org.apache.lucene.codecs
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
class SimpleTextDocValuesReader extends DocValuesProducer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SimpleTextDocValuesReader.DocValuesIterator
(package private) static class
SimpleTextDocValuesReader.OneField
-
Field Summary
Fields Modifier and Type Field Description (package private) IndexInput
data
(package private) java.util.Map<java.lang.String,SimpleTextDocValuesReader.OneField>
fields
(package private) int
maxDoc
(package private) BytesRefBuilder
scratch
-
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 void
checkIntegrity()
Checks consistency of this producervoid
close()
BinaryDocValues
getBinary(FieldInfo fieldInfo)
ReturnsBinaryDocValues
for this field.private SimpleTextDocValuesReader.DocValuesIterator
getBinaryDocsWithField(FieldInfo fieldInfo)
NumericDocValues
getNumeric(FieldInfo fieldInfo)
ReturnsNumericDocValues
for this field.private SimpleTextDocValuesReader.DocValuesIterator
getNumericDocsWithField(FieldInfo fieldInfo)
(package private) java.util.function.IntFunction<java.lang.Long>
getNumericNonIterator(FieldInfo fieldInfo)
SortedDocValues
getSorted(FieldInfo fieldInfo)
ReturnsSortedDocValues
for this field.SortedNumericDocValues
getSortedNumeric(FieldInfo field)
ReturnsSortedNumericDocValues
for this field.SortedSetDocValues
getSortedSet(FieldInfo fieldInfo)
ReturnsSortedSetDocValues
for this field.private void
readLine()
Used only in ctor:private boolean
startsWith(BytesRef prefix)
Used only in ctor:private java.lang.String
stripPrefix(BytesRef prefix)
Used only in ctor:java.lang.String
toString()
-
Methods inherited from class org.apache.lucene.codecs.DocValuesProducer
getMergeInstance
-
-
-
-
Field Detail
-
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:DocValuesProducer
ReturnsNumericDocValues
for this field. The returned instance need not be thread-safe: it will only be used by a single thread. The behavior is undefined if the doc values type of the given field is notDocValuesType.NUMERIC
. The return value is nevernull
.- Specified by:
getNumeric
in 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:DocValuesProducer
ReturnsBinaryDocValues
for this field. The returned instance need not be thread-safe: it will only be used by a single thread. The behavior is undefined if the doc values type of the given field is notDocValuesType.BINARY
. The return value is nevernull
.- Specified by:
getBinary
in 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:DocValuesProducer
ReturnsSortedDocValues
for this field. The returned instance need not be thread-safe: it will only be used by a single thread. The behavior is undefined if the doc values type of the given field is notDocValuesType.SORTED
. The return value is nevernull
.- Specified by:
getSorted
in classDocValuesProducer
- Throws:
java.io.IOException
-
getSortedNumeric
public SortedNumericDocValues getSortedNumeric(FieldInfo field) throws java.io.IOException
Description copied from class:DocValuesProducer
ReturnsSortedNumericDocValues
for this field. The returned instance need not be thread-safe: it will only be used by a single thread. The behavior is undefined if the doc values type of the given field is notDocValuesType.SORTED_NUMERIC
. The return value is nevernull
.- Specified by:
getSortedNumeric
in classDocValuesProducer
- Throws:
java.io.IOException
-
getSortedSet
public SortedSetDocValues getSortedSet(FieldInfo fieldInfo) throws java.io.IOException
Description copied from class:DocValuesProducer
ReturnsSortedSetDocValues
for this field. The returned instance need not be thread-safe: it will only be used by a single thread. The behavior is undefined if the doc values type of the given field is notDocValuesType.SORTED_SET
. The return value is nevernull
.- Specified by:
getSortedSet
in classDocValuesProducer
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
readLine
private void readLine() throws java.io.IOException
Used 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:
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
checkIntegrity
public void checkIntegrity() throws java.io.IOException
Description copied from class:DocValuesProducer
Checks 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:
checkIntegrity
in classDocValuesProducer
- Throws:
java.io.IOException
-
-