Package org.apache.lucene.index
Class SegmentDocValuesProducer
- java.lang.Object
-
- org.apache.lucene.codecs.DocValuesProducer
-
- org.apache.lucene.index.SegmentDocValuesProducer
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Accountable
class SegmentDocValuesProducer extends DocValuesProducer
Encapsulates multiple producers when there are docvalues updates as one producer
-
-
Field Summary
Fields Modifier and Type Field Description private static longBASE_RAM_BYTES_USED(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>dvProducersByFieldprivate static longLONG_RAM_BYTES_USED-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
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 voidcheckIntegrity()Checks consistency of this producervoidclose()BinaryDocValuesgetBinary(FieldInfo field)ReturnsBinaryDocValuesfor this field.java.util.Collection<Accountable>getChildResources()Returns nested resources of this class.NumericDocValuesgetNumeric(FieldInfo field)ReturnsNumericDocValuesfor this field.SortedDocValuesgetSorted(FieldInfo field)ReturnsSortedDocValuesfor this field.SortedNumericDocValuesgetSortedNumeric(FieldInfo field)ReturnsSortedNumericDocValuesfor this field.SortedSetDocValuesgetSortedSet(FieldInfo field)ReturnsSortedSetDocValuesfor this field.longramBytesUsed()Return the memory usage of this object in bytes.java.lang.StringtoString()-
Methods inherited from class org.apache.lucene.codecs.DocValuesProducer
getMergeInstance
-
-
-
-
Field Detail
-
LONG_RAM_BYTES_USED
private static final long LONG_RAM_BYTES_USED
-
BASE_RAM_BYTES_USED
private static final long BASE_RAM_BYTES_USED
-
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:DocValuesProducerReturnsNumericDocValuesfor this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Specified by:
getNumericin classDocValuesProducer- Throws:
java.io.IOException
-
getBinary
public BinaryDocValues getBinary(FieldInfo field) throws java.io.IOException
Description copied from class:DocValuesProducerReturnsBinaryDocValuesfor this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Specified by:
getBinaryin classDocValuesProducer- Throws:
java.io.IOException
-
getSorted
public SortedDocValues getSorted(FieldInfo field) throws java.io.IOException
Description copied from class:DocValuesProducerReturnsSortedDocValuesfor this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Specified by:
getSortedin classDocValuesProducer- Throws:
java.io.IOException
-
getSortedNumeric
public SortedNumericDocValues getSortedNumeric(FieldInfo field) throws java.io.IOException
Description copied from class:DocValuesProducerReturnsSortedNumericDocValuesfor this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Specified by:
getSortedNumericin classDocValuesProducer- Throws:
java.io.IOException
-
getSortedSet
public SortedSetDocValues getSortedSet(FieldInfo field) throws java.io.IOException
Description copied from class:DocValuesProducerReturnsSortedSetDocValuesfor this field. The returned instance need not be thread-safe: it will only be used by a single thread.- Specified by:
getSortedSetin classDocValuesProducer- Throws:
java.io.IOException
-
checkIntegrity
public void checkIntegrity() throws java.io.IOExceptionDescription copied from class:DocValuesProducerChecks 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:
checkIntegrityin classDocValuesProducer- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.
-
getChildResources
public java.util.Collection<Accountable> getChildResources()
Description copied from interface:AccountableReturns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).- See Also:
Accountables
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-