- java.lang.Object
-
- org.apache.lucene.codecs.DocValuesProducer
-
- org.apache.lucene.index.SegmentDocValuesProducer
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
class SegmentDocValuesProducer extends DocValuesProducer
Encapsulates multiple producers when there are docvalues updates as one producer
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<java.lang.Long>
dvGens
(package private) java.util.Set<DocValuesProducer>
dvProducers
(package private) java.util.Map<java.lang.String,DocValuesProducer>
dvProducersByField
-
Constructor Summary
Constructors Constructor Description SegmentDocValuesProducer(SegmentCommitInfo si, Directory dir, FieldInfos coreInfos, FieldInfos allInfos, SegmentDocValues segDocValues)
Creates a new producer that handles updated docvalues fields
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkIntegrity()
Checks consistency of this producervoid
close()
BinaryDocValues
getBinary(FieldInfo field)
ReturnsBinaryDocValues
for this field.NumericDocValues
getNumeric(FieldInfo field)
ReturnsNumericDocValues
for this field.SortedDocValues
getSorted(FieldInfo field)
ReturnsSortedDocValues
for this field.SortedNumericDocValues
getSortedNumeric(FieldInfo field)
ReturnsSortedNumericDocValues
for this field.SortedSetDocValues
getSortedSet(FieldInfo field)
ReturnsSortedSetDocValues
for this field.java.lang.String
toString()
-
Methods inherited from class org.apache.lucene.codecs.DocValuesProducer
getMergeInstance
-
-
-
-
Field Detail
-
dvProducersByField
final java.util.Map<java.lang.String,DocValuesProducer> dvProducersByField
-
dvProducers
final java.util.Set<DocValuesProducer> dvProducers
-
dvGens
final java.util.List<java.lang.Long> dvGens
-
-
Constructor Detail
-
SegmentDocValuesProducer
SegmentDocValuesProducer(SegmentCommitInfo si, Directory dir, FieldInfos coreInfos, FieldInfos allInfos, SegmentDocValues segDocValues) throws java.io.IOException
Creates a new producer that handles updated docvalues fields- Parameters:
si
- commit pointdir
- directorycoreInfos
- fieldinfos for the segmentallInfos
- all fieldinfos including updated onessegDocValues
- producer map- Throws:
java.io.IOException
-
-
Method Detail
-
getNumeric
public NumericDocValues getNumeric(FieldInfo field) 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
-
getBinary
public BinaryDocValues getBinary(FieldInfo field) 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
-
getSorted
public SortedDocValues getSorted(FieldInfo field) 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 field) 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
-
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
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-