Package org.apache.lucene.codecs.memory
Class DirectDocValuesProducer
- java.lang.Object
-
- org.apache.lucene.codecs.DocValuesProducer
-
- org.apache.lucene.codecs.memory.DirectDocValuesProducer
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Accountable
class DirectDocValuesProducer extends DocValuesProducer
Reader forDirectDocValuesFormat
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
DirectDocValuesProducer.BinaryEntry
(package private) static class
DirectDocValuesProducer.BinaryRawValues
(package private) static class
DirectDocValuesProducer.FSTEntry
(package private) static class
DirectDocValuesProducer.NumericEntry
(package private) static class
DirectDocValuesProducer.NumericRawValues
(package private) static class
DirectDocValuesProducer.SortedEntry
(package private) static class
DirectDocValuesProducer.SortedNumericEntry
(package private) static class
DirectDocValuesProducer.SortedNumericRawValues
(package private) static class
DirectDocValuesProducer.SortedRawValues
(package private) static class
DirectDocValuesProducer.SortedSetEntry
(package private) static class
DirectDocValuesProducer.SortedSetRawValues
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,DirectDocValuesProducer.BinaryEntry>
binaries
private java.util.Map<java.lang.String,DirectDocValuesProducer.BinaryRawValues>
binaryInstances
(package private) static byte
BYTES
private IndexInput
data
private java.util.Map<java.lang.String,FixedBitSet>
docsWithFieldInstances
private int
maxDoc
private boolean
merging
(package private) static byte
NUMBER
private int
numEntries
private java.util.Map<java.lang.String,DirectDocValuesProducer.NumericRawValues>
numericInstances
private java.util.Map<java.lang.String,DirectDocValuesProducer.NumericEntry>
numerics
private java.util.concurrent.atomic.AtomicLong
ramBytesUsed
(package private) static byte
SORTED
(package private) static byte
SORTED_NUMERIC
(package private) static byte
SORTED_NUMERIC_SINGLETON
(package private) static byte
SORTED_SET
(package private) static byte
SORTED_SET_SINGLETON
private java.util.Map<java.lang.String,DirectDocValuesProducer.SortedRawValues>
sortedInstances
private java.util.Map<java.lang.String,DirectDocValuesProducer.SortedNumericRawValues>
sortedNumericInstances
private java.util.Map<java.lang.String,DirectDocValuesProducer.SortedNumericEntry>
sortedNumerics
private java.util.Map<java.lang.String,DirectDocValuesProducer.SortedEntry>
sorteds
private java.util.Map<java.lang.String,DirectDocValuesProducer.SortedSetRawValues>
sortedSetInstances
private java.util.Map<java.lang.String,DirectDocValuesProducer.SortedSetEntry>
sortedSets
private int
version
(package private) static int
VERSION_CURRENT
(package private) static int
VERSION_START
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description DirectDocValuesProducer(DirectDocValuesProducer original)
DirectDocValuesProducer(SegmentReadState state, java.lang.String dataCodec, java.lang.String dataExtension, java.lang.String metaCodec, java.lang.String metaExtension)
-
Method Summary
-
-
-
Field Detail
-
numerics
private final java.util.Map<java.lang.String,DirectDocValuesProducer.NumericEntry> numerics
-
binaries
private final java.util.Map<java.lang.String,DirectDocValuesProducer.BinaryEntry> binaries
-
sorteds
private final java.util.Map<java.lang.String,DirectDocValuesProducer.SortedEntry> sorteds
-
sortedSets
private final java.util.Map<java.lang.String,DirectDocValuesProducer.SortedSetEntry> sortedSets
-
sortedNumerics
private final java.util.Map<java.lang.String,DirectDocValuesProducer.SortedNumericEntry> sortedNumerics
-
data
private final IndexInput data
-
numericInstances
private final java.util.Map<java.lang.String,DirectDocValuesProducer.NumericRawValues> numericInstances
-
binaryInstances
private final java.util.Map<java.lang.String,DirectDocValuesProducer.BinaryRawValues> binaryInstances
-
sortedInstances
private final java.util.Map<java.lang.String,DirectDocValuesProducer.SortedRawValues> sortedInstances
-
sortedSetInstances
private final java.util.Map<java.lang.String,DirectDocValuesProducer.SortedSetRawValues> sortedSetInstances
-
sortedNumericInstances
private final java.util.Map<java.lang.String,DirectDocValuesProducer.SortedNumericRawValues> sortedNumericInstances
-
docsWithFieldInstances
private final java.util.Map<java.lang.String,FixedBitSet> docsWithFieldInstances
-
numEntries
private final int numEntries
-
maxDoc
private final int maxDoc
-
ramBytesUsed
private final java.util.concurrent.atomic.AtomicLong ramBytesUsed
-
version
private final int version
-
merging
private final boolean merging
-
NUMBER
static final byte NUMBER
- See Also:
- Constant Field Values
-
BYTES
static final byte BYTES
- See Also:
- Constant Field Values
-
SORTED
static final byte SORTED
- See Also:
- Constant Field Values
-
SORTED_SET
static final byte SORTED_SET
- See Also:
- Constant Field Values
-
SORTED_SET_SINGLETON
static final byte SORTED_SET_SINGLETON
- See Also:
- Constant Field Values
-
SORTED_NUMERIC
static final byte SORTED_NUMERIC
- See Also:
- Constant Field Values
-
SORTED_NUMERIC_SINGLETON
static final byte SORTED_NUMERIC_SINGLETON
- See Also:
- Constant Field Values
-
VERSION_START
static final int VERSION_START
- See Also:
- Constant Field Values
-
VERSION_CURRENT
static final int VERSION_CURRENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DirectDocValuesProducer
DirectDocValuesProducer(DirectDocValuesProducer original)
-
DirectDocValuesProducer
DirectDocValuesProducer(SegmentReadState state, java.lang.String dataCodec, java.lang.String dataExtension, java.lang.String metaCodec, java.lang.String metaExtension) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
readNumericEntry
private DirectDocValuesProducer.NumericEntry readNumericEntry(IndexInput meta) throws java.io.IOException
- Throws:
java.io.IOException
-
readBinaryEntry
private DirectDocValuesProducer.BinaryEntry readBinaryEntry(IndexInput meta) throws java.io.IOException
- Throws:
java.io.IOException
-
readSortedEntry
private DirectDocValuesProducer.SortedEntry readSortedEntry(IndexInput meta) throws java.io.IOException
- Throws:
java.io.IOException
-
readSortedSetEntry
private DirectDocValuesProducer.SortedSetEntry readSortedSetEntry(IndexInput meta, boolean singleton) throws java.io.IOException
- Throws:
java.io.IOException
-
readSortedNumericEntry
private DirectDocValuesProducer.SortedNumericEntry readSortedNumericEntry(IndexInput meta, boolean singleton) throws java.io.IOException
- Throws:
java.io.IOException
-
readFields
private int readFields(IndexInput meta, FieldInfos infos) throws java.io.IOException
- Throws:
java.io.IOException
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.
-
getChildResources
public java.util.Collection<Accountable> getChildResources()
Description copied from interface:Accountable
Returns 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:
toString
in classjava.lang.Object
-
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
-
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.- Specified by:
getNumeric
in classDocValuesProducer
- Throws:
java.io.IOException
-
loadNumeric
private DirectDocValuesProducer.NumericRawValues loadNumeric(DirectDocValuesProducer.NumericEntry entry) throws java.io.IOException
- Throws:
java.io.IOException
-
getLegacyBinary
private LegacyBinaryDocValues getLegacyBinary(FieldInfo field) throws java.io.IOException
- 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.- Specified by:
getBinary
in classDocValuesProducer
- Throws:
java.io.IOException
-
loadBinary
private DirectDocValuesProducer.BinaryRawValues loadBinary(DirectDocValuesProducer.BinaryEntry entry) throws java.io.IOException
- 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.- Specified by:
getSorted
in classDocValuesProducer
- Throws:
java.io.IOException
-
newSortedInstance
private LegacySortedDocValues newSortedInstance(LegacyNumericDocValues docToOrd, LegacyBinaryDocValues values, int count)
-
loadSorted
private DirectDocValuesProducer.SortedRawValues loadSorted(FieldInfo field) throws java.io.IOException
- 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.- Specified by:
getSortedNumeric
in classDocValuesProducer
- Throws:
java.io.IOException
-
loadSortedNumeric
private DirectDocValuesProducer.SortedNumericRawValues loadSortedNumeric(DirectDocValuesProducer.SortedNumericEntry entry) throws java.io.IOException
- 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.- Specified by:
getSortedSet
in classDocValuesProducer
- Throws:
java.io.IOException
-
loadSortedSet
private DirectDocValuesProducer.SortedSetRawValues loadSortedSet(DirectDocValuesProducer.SortedSetEntry entry) throws java.io.IOException
- Throws:
java.io.IOException
-
getMissingBits
private Bits getMissingBits(FieldInfo field, long offset, long length) throws java.io.IOException
- Throws:
java.io.IOException
-
getMergeInstance
public DocValuesProducer getMergeInstance()
Description copied from class:DocValuesProducer
Returns an instance optimized for merging. This instance may only be consumed in the thread that calledDocValuesProducer.getMergeInstance()
.The default implementation returns
this
- Overrides:
getMergeInstance
in classDocValuesProducer
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
-