- java.lang.Object
-
- org.apache.lucene.codecs.DocValuesProducer
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
EmptyDocValuesProducer
,Lucene70DocValuesProducer
,Lucene80DocValuesProducer
,Lucene90DocValuesProducer
,PerFieldDocValuesFormat.FieldsReader
,SegmentDocValuesProducer
,SimpleTextDocValuesReader
,SlowCompositeCodecReaderWrapper.SlowCompositeDocValuesProducerWrapper
public abstract class DocValuesProducer extends java.lang.Object implements java.io.Closeable
Abstract API that produces numeric, binary, sorted, sortedset, and sortednumeric docvalues.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DocValuesProducer()
Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
checkIntegrity()
Checks consistency of this producerabstract BinaryDocValues
getBinary(FieldInfo field)
ReturnsBinaryDocValues
for this field.DocValuesProducer
getMergeInstance()
Returns an instance optimized for merging.abstract NumericDocValues
getNumeric(FieldInfo field)
ReturnsNumericDocValues
for this field.abstract SortedDocValues
getSorted(FieldInfo field)
ReturnsSortedDocValues
for this field.abstract SortedNumericDocValues
getSortedNumeric(FieldInfo field)
ReturnsSortedNumericDocValues
for this field.abstract SortedSetDocValues
getSortedSet(FieldInfo field)
ReturnsSortedSetDocValues
for this field.
-
-
-
Method Detail
-
getNumeric
public abstract NumericDocValues getNumeric(FieldInfo field) throws java.io.IOException
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
.- Throws:
java.io.IOException
-
getBinary
public abstract BinaryDocValues getBinary(FieldInfo field) throws java.io.IOException
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
.- Throws:
java.io.IOException
-
getSorted
public abstract SortedDocValues getSorted(FieldInfo field) throws java.io.IOException
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
.- Throws:
java.io.IOException
-
getSortedNumeric
public abstract SortedNumericDocValues getSortedNumeric(FieldInfo field) throws java.io.IOException
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
.- Throws:
java.io.IOException
-
getSortedSet
public abstract SortedSetDocValues getSortedSet(FieldInfo field) throws java.io.IOException
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
.- Throws:
java.io.IOException
-
checkIntegrity
public abstract void checkIntegrity() throws java.io.IOException
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.
- Throws:
java.io.IOException
-
getMergeInstance
public DocValuesProducer getMergeInstance()
Returns an instance optimized for merging. This instance may only be consumed in the thread that calledgetMergeInstance()
.The default implementation returns
this
-
-