Package org.apache.lucene.codecs
Class DocValuesProducer
- java.lang.Object
-
- org.apache.lucene.codecs.DocValuesProducer
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
EmptyDocValuesProducer
public abstract class DocValuesProducer extends Object implements Closeable
Abstract API that produces numeric, binary, sorted, sortedset, and sortednumeric docvalues.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
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 IOException
ReturnsNumericDocValues
for this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Throws:
IOException
-
getBinary
public abstract BinaryDocValues getBinary(FieldInfo field) throws IOException
ReturnsBinaryDocValues
for this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Throws:
IOException
-
getSorted
public abstract SortedDocValues getSorted(FieldInfo field) throws IOException
ReturnsSortedDocValues
for this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Throws:
IOException
-
getSortedNumeric
public abstract SortedNumericDocValues getSortedNumeric(FieldInfo field) throws IOException
ReturnsSortedNumericDocValues
for this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Throws:
IOException
-
getSortedSet
public abstract SortedSetDocValues getSortedSet(FieldInfo field) throws IOException
ReturnsSortedSetDocValues
for this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Throws:
IOException
-
checkIntegrity
public abstract void checkIntegrity() throws 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:
IOException
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
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
-
-