Package org.apache.lucene.codecs
Class DocValuesProducer
java.lang.Object
org.apache.lucene.codecs.DocValuesProducer
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
EmptyDocValuesProducer
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 -
Method Summary
Modifier and TypeMethodDescriptionabstract voidChecks consistency of this producerabstract BinaryDocValuesReturnsBinaryDocValuesfor this field.Returns an instance optimized for merging.abstract NumericDocValuesgetNumeric(FieldInfo field) ReturnsNumericDocValuesfor this field.abstract DocValuesSkippergetSkipper(FieldInfo field) Returns aDocValuesSkipperfor this field.abstract SortedDocValuesReturnsSortedDocValuesfor this field.abstract SortedNumericDocValuesgetSortedNumeric(FieldInfo field) ReturnsSortedNumericDocValuesfor this field.abstract SortedSetDocValuesgetSortedSet(FieldInfo field) ReturnsSortedSetDocValuesfor this field.
-
Constructor Details
-
DocValuesProducer
protected DocValuesProducer()Sole constructor. (For invocation by subclass constructors, typically implicit.)
-
-
Method Details
-
getNumeric
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
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
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
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
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
-
getSkipper
Returns aDocValuesSkipperfor this field. The returned instance need not be thread-safe: it will only be used by a single thread. The return value is undefined ifFieldInfo.docValuesSkipIndexType()returnsDocValuesSkipIndexType.NONE.- Throws:
IOException
-
checkIntegrity
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
Returns an instance optimized for merging. This instance may only be consumed in the thread that calledgetMergeInstance().The default implementation returns
this
-