Package org.apache.lucene.codecs.memory
Class DirectDocValuesConsumer
- java.lang.Object
-
- org.apache.lucene.codecs.DocValuesConsumer
-
- org.apache.lucene.codecs.memory.DirectDocValuesConsumer
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
class DirectDocValuesConsumer extends DocValuesConsumer
Writer forDirectDocValuesFormat
-
-
Field Summary
Fields Modifier and Type Field Description (package private) IndexOutput
data
(package private) int
maxDoc
(package private) IndexOutput
meta
-
Constructor Summary
Constructors Constructor Description DirectDocValuesConsumer(SegmentWriteState state, java.lang.String dataCodec, java.lang.String dataExtension, java.lang.String metaCodec, java.lang.String metaExtension)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBinaryField(FieldInfo field, DocValuesProducer valuesProducer)
Writes binary docvalues for a field.private void
addBinaryFieldValues(FieldInfo field, java.lang.Iterable<BytesRef> values)
void
addNumericField(FieldInfo field, DocValuesProducer valuesProducer)
Writes numeric docvalues for a field.private void
addNumericFieldValues(FieldInfo field, java.lang.Iterable<java.lang.Number> values)
void
addSortedField(FieldInfo field, DocValuesProducer valuesProducer)
Writes pre-sorted binary docvalues for a field.void
addSortedNumericField(FieldInfo field, DocValuesProducer valuesProducer)
Writes pre-sorted numeric docvalues for a fieldvoid
addSortedSetField(FieldInfo field, DocValuesProducer valuesProducer)
Writes pre-sorted set docvalues for a fieldvoid
close()
private java.lang.Iterable<java.lang.Number>
countToAddressIterator(java.lang.Iterable<java.lang.Number> counts)
Just aggregates the count values so they become "addresses", and adds one more value in the end (the final sum)(package private) void
writeMissingBitset(java.lang.Iterable<?> values)
-
Methods inherited from class org.apache.lucene.codecs.DocValuesConsumer
isSingleValued, merge, mergeBinaryField, mergeNumericField, mergeSortedField, mergeSortedNumericField, mergeSortedSetField, singletonView
-
-
-
-
Field Detail
-
data
IndexOutput data
-
meta
IndexOutput meta
-
maxDoc
final int maxDoc
-
-
Constructor Detail
-
DirectDocValuesConsumer
DirectDocValuesConsumer(SegmentWriteState 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
-
addNumericField
public void addNumericField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumer
Writes numeric docvalues for a field.- Specified by:
addNumericField
in classDocValuesConsumer
- Parameters:
field
- field informationvaluesProducer
- Numeric values to write.- Throws:
java.io.IOException
- if an I/O error occurred.
-
addNumericFieldValues
private void addNumericFieldValues(FieldInfo field, java.lang.Iterable<java.lang.Number> values) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
addBinaryField
public void addBinaryField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumer
Writes binary docvalues for a field.- Specified by:
addBinaryField
in classDocValuesConsumer
- Parameters:
field
- field informationvaluesProducer
- Binary values to write.- Throws:
java.io.IOException
- if an I/O error occurred.
-
addBinaryFieldValues
private void addBinaryFieldValues(FieldInfo field, java.lang.Iterable<BytesRef> values) throws java.io.IOException
- Throws:
java.io.IOException
-
writeMissingBitset
void writeMissingBitset(java.lang.Iterable<?> values) throws java.io.IOException
- Throws:
java.io.IOException
-
addSortedField
public void addSortedField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumer
Writes pre-sorted binary docvalues for a field.- Specified by:
addSortedField
in classDocValuesConsumer
- Parameters:
field
- field informationvaluesProducer
- produces the values and ordinals to write- Throws:
java.io.IOException
- if an I/O error occurred.
-
addSortedNumericField
public void addSortedNumericField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumer
Writes pre-sorted numeric docvalues for a field- Specified by:
addSortedNumericField
in classDocValuesConsumer
- Parameters:
field
- field informationvaluesProducer
- produces the values to write- Throws:
java.io.IOException
- if an I/O error occurred.
-
addSortedSetField
public void addSortedSetField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumer
Writes pre-sorted set docvalues for a field- Specified by:
addSortedSetField
in classDocValuesConsumer
- Parameters:
field
- field informationvaluesProducer
- produces the values to write- Throws:
java.io.IOException
- if an I/O error occurred.
-
countToAddressIterator
private java.lang.Iterable<java.lang.Number> countToAddressIterator(java.lang.Iterable<java.lang.Number> counts)
Just aggregates the count values so they become "addresses", and adds one more value in the end (the final sum)
-
-