Class Lucene80DocValuesConsumer
java.lang.Object
org.apache.lucene.codecs.DocValuesConsumer
org.apache.lucene.backward_codecs.lucene80.Lucene80DocValuesConsumer
- All Implemented Interfaces:
Closeable
,AutoCloseable
writer for
Lucene80DocValuesFormat
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) IndexOutput
(package private) final int
(package private) IndexOutput
(package private) final Lucene80DocValuesFormat.Mode
private final SegmentWriteState
private byte[]
-
Constructor Summary
ConstructorsConstructorDescriptionLucene80DocValuesConsumer
(SegmentWriteState state, String dataCodec, String dataExtension, String metaCodec, String metaExtension, Lucene80DocValuesFormat.Mode mode) expert: Creates a new writer -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBinaryField
(FieldInfo field, DocValuesProducer valuesProducer) Writes binary docvalues for a field.void
addNumericField
(FieldInfo field, DocValuesProducer valuesProducer) Writes numeric docvalues for a field.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 fieldprivate void
addTermsDict
(SortedSetDocValues values) void
close()
private int
compressAndGetTermsDictBlockLength
(ByteArrayDataOutput bufferedOutput, LZ4.FastCompressionHashTable ht) private void
doAddCompressedBinaryField
(FieldInfo field, DocValuesProducer valuesProducer) private void
doAddSortedField
(FieldInfo field, DocValuesProducer valuesProducer) private void
doAddUncompressedBinaryField
(FieldInfo field, DocValuesProducer valuesProducer) private ByteArrayDataOutput
maybeGrowBuffer
(ByteArrayDataOutput bufferedOutput, int termLength) private void
writeBlock
(long[] values, int length, long gcd, ByteBuffersDataOutput buffer) private void
writeTermsIndex
(SortedSetDocValues values) private long[]
writeValues
(FieldInfo field, DocValuesProducer valuesProducer) private long
writeValuesMultipleBlocks
(SortedNumericDocValues values, long gcd) private void
writeValuesSingleBlock
(SortedNumericDocValues values, long numValues, int numBitsPerValue, long min, long gcd, Map<Long, Integer> encode) Methods inherited from class org.apache.lucene.codecs.DocValuesConsumer
isSingleValued, merge, mergeBinaryField, mergeNumericField, mergeSortedField, mergeSortedNumericField, mergeSortedSetField, singletonView
-
Field Details
-
mode
-
data
IndexOutput data -
meta
IndexOutput meta -
maxDoc
final int maxDoc -
state
-
termsDictBuffer
private byte[] termsDictBuffer
-
-
Constructor Details
-
Lucene80DocValuesConsumer
public Lucene80DocValuesConsumer(SegmentWriteState state, String dataCodec, String dataExtension, String metaCodec, String metaExtension, Lucene80DocValuesFormat.Mode mode) throws IOException expert: Creates a new writer- Throws:
IOException
-
-
Method Details
-
close
- Throws:
IOException
-
addNumericField
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:
IOException
- if an I/O error occurred.
-
writeValues
- Throws:
IOException
-
writeValuesSingleBlock
private void writeValuesSingleBlock(SortedNumericDocValues values, long numValues, int numBitsPerValue, long min, long gcd, Map<Long, Integer> encode) throws IOException- Throws:
IOException
-
writeValuesMultipleBlocks
- Throws:
IOException
-
writeBlock
private void writeBlock(long[] values, int length, long gcd, ByteBuffersDataOutput buffer) throws IOException - Throws:
IOException
-
addBinaryField
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:
IOException
- if an I/O error occurred.
-
doAddUncompressedBinaryField
private void doAddUncompressedBinaryField(FieldInfo field, DocValuesProducer valuesProducer) throws IOException - Throws:
IOException
-
doAddCompressedBinaryField
private void doAddCompressedBinaryField(FieldInfo field, DocValuesProducer valuesProducer) throws IOException - Throws:
IOException
-
addSortedField
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:
IOException
- if an I/O error occurred.
-
doAddSortedField
- Throws:
IOException
-
addTermsDict
- Throws:
IOException
-
compressAndGetTermsDictBlockLength
private int compressAndGetTermsDictBlockLength(ByteArrayDataOutput bufferedOutput, LZ4.FastCompressionHashTable ht) throws IOException - Throws:
IOException
-
maybeGrowBuffer
-
writeTermsIndex
- Throws:
IOException
-
addSortedNumericField
public void addSortedNumericField(FieldInfo field, DocValuesProducer valuesProducer) throws 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:
IOException
- if an I/O error occurred.
-
addSortedSetField
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:
IOException
- if an I/O error occurred.
-