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 protectedDocValuesProducer()Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcheckIntegrity()Checks consistency of this producerabstract BinaryDocValuesgetBinary(FieldInfo field)ReturnsBinaryDocValuesfor this field.DocValuesProducergetMergeInstance()Returns an instance optimized for merging.abstract NumericDocValuesgetNumeric(FieldInfo field)ReturnsNumericDocValuesfor this field.abstract SortedDocValuesgetSorted(FieldInfo field)ReturnsSortedDocValuesfor this field.abstract SortedNumericDocValuesgetSortedNumeric(FieldInfo field)ReturnsSortedNumericDocValuesfor this field.abstract SortedSetDocValuesgetSortedSet(FieldInfo field)ReturnsSortedSetDocValuesfor this field.
-
-
-
Method Detail
-
getNumeric
public abstract NumericDocValues getNumeric(FieldInfo field) throws IOException
ReturnsNumericDocValuesfor 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:
IOException
-
getBinary
public abstract BinaryDocValues getBinary(FieldInfo field) throws IOException
ReturnsBinaryDocValuesfor 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:
IOException
-
getSorted
public abstract SortedDocValues getSorted(FieldInfo field) throws IOException
ReturnsSortedDocValuesfor 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:
IOException
-
getSortedNumeric
public abstract SortedNumericDocValues getSortedNumeric(FieldInfo field) throws IOException
ReturnsSortedNumericDocValuesfor 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:
IOException
-
getSortedSet
public abstract SortedSetDocValues getSortedSet(FieldInfo field) throws IOException
ReturnsSortedSetDocValuesfor 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:
IOException
-
checkIntegrity
public abstract void checkIntegrity() throws IOExceptionChecks 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
-
-