Module org.apache.lucene.core
Class Lucene90DocValuesConsumer
java.lang.Object
org.apache.lucene.codecs.DocValuesConsumer
org.apache.lucene.codecs.lucene90.Lucene90DocValuesConsumer
- All Implemented Interfaces:
Closeable,AutoCloseable
writer for
Lucene90DocValuesFormat-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) IndexOutput(package private) final int(package private) IndexOutputprivate final intprivate byte[] -
Constructor Summary
ConstructorsConstructorDescriptionLucene90DocValuesConsumer(SegmentWriteState state, int skipIndexIntervalSize, String dataCodec, String dataExtension, String metaCodec, String metaExtension) expert: Creates a new writer -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBinaryField(FieldInfo field, DocValuesProducer valuesProducer) Writes binary docvalues for a field.voidaddNumericField(FieldInfo field, DocValuesProducer valuesProducer) Writes numeric docvalues for a field.voidaddSortedField(FieldInfo field, DocValuesProducer valuesProducer) Writes pre-sorted binary docvalues for a field.voidaddSortedNumericField(FieldInfo field, DocValuesProducer valuesProducer) Writes pre-sorted numeric docvalues for a fieldvoidaddSortedSetField(FieldInfo field, DocValuesProducer valuesProducer) Writes pre-sorted set docvalues for a fieldprivate voidaddTermsDict(SortedSetDocValues values) private static List<Lucene90DocValuesConsumer.SkipAccumulator> buildLevel(List<Lucene90DocValuesConsumer.SkipAccumulator> accumulators) voidclose()private intcompressAndGetTermsDictBlockLength(ByteArrayDataOutput bufferedOutput, int dictLength, LZ4.FastCompressionHashTable ht) private voiddoAddSortedField(FieldInfo field, DocValuesProducer valuesProducer, boolean addTypeByte) private voiddoAddSortedNumericField(FieldInfo field, DocValuesProducer valuesProducer, boolean ords) private static intgetLevels(int index, int size) private static booleanisSingleValued(SortedSetDocValues values) private ByteArrayDataOutputmaybeGrowBuffer(ByteArrayDataOutput bufferedOutput, int termLength) private voidwriteBlock(long[] values, int length, long gcd, ByteBuffersDataOutput buffer) private voidwriteLevels(List<Lucene90DocValuesConsumer.SkipAccumulator> accumulators) private voidwriteSkipIndex(FieldInfo field, DocValuesProducer valuesProducer) private voidwriteTermsIndex(SortedSetDocValues values) private long[]writeValues(FieldInfo field, DocValuesProducer valuesProducer, boolean ords) private longwriteValuesMultipleBlocks(SortedNumericDocValues values, long gcd) private voidwriteValuesSingleBlock(SortedNumericDocValues values, long numValues, int numBitsPerValue, long min, long gcd, LongIntHashMap encode) Methods inherited from class org.apache.lucene.codecs.DocValuesConsumer
isSingleValued, merge, mergeBinaryField, mergeNumericField, mergeSortedField, mergeSortedNumericField, mergeSortedSetField, singletonView
-
Field Details
-
data
IndexOutput data -
meta
IndexOutput meta -
maxDoc
final int maxDoc -
termsDictBuffer
private byte[] termsDictBuffer -
skipIndexIntervalSize
private final int skipIndexIntervalSize
-
-
Constructor Details
-
Lucene90DocValuesConsumer
public Lucene90DocValuesConsumer(SegmentWriteState state, int skipIndexIntervalSize, String dataCodec, String dataExtension, String metaCodec, String metaExtension) throws IOException expert: Creates a new writer- Throws:
IOException
-
-
Method Details
-
close
- Throws:
IOException
-
addNumericField
Description copied from class:DocValuesConsumerWrites numeric docvalues for a field.- Specified by:
addNumericFieldin classDocValuesConsumer- Parameters:
field- field informationvaluesProducer- Numeric values to write.- Throws:
IOException- if an I/O error occurred.
-
writeSkipIndex
- Throws:
IOException
-
writeLevels
private void writeLevels(List<Lucene90DocValuesConsumer.SkipAccumulator> accumulators) throws IOException - Throws:
IOException
-
buildLevel
private static List<Lucene90DocValuesConsumer.SkipAccumulator> buildLevel(List<Lucene90DocValuesConsumer.SkipAccumulator> accumulators) -
getLevels
private static int getLevels(int index, int size) -
writeValues
private long[] writeValues(FieldInfo field, DocValuesProducer valuesProducer, boolean ords) throws IOException - Throws:
IOException
-
writeValuesSingleBlock
private void writeValuesSingleBlock(SortedNumericDocValues values, long numValues, int numBitsPerValue, long min, long gcd, LongIntHashMap 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:DocValuesConsumerWrites binary docvalues for a field.- Specified by:
addBinaryFieldin classDocValuesConsumer- Parameters:
field- field informationvaluesProducer- Binary values to write.- Throws:
IOException- if an I/O error occurred.
-
addSortedField
Description copied from class:DocValuesConsumerWrites pre-sorted binary docvalues for a field.- Specified by:
addSortedFieldin classDocValuesConsumer- Parameters:
field- field informationvaluesProducer- produces the values and ordinals to write- Throws:
IOException- if an I/O error occurred.
-
doAddSortedField
private void doAddSortedField(FieldInfo field, DocValuesProducer valuesProducer, boolean addTypeByte) throws IOException - Throws:
IOException
-
addTermsDict
- Throws:
IOException
-
compressAndGetTermsDictBlockLength
private int compressAndGetTermsDictBlockLength(ByteArrayDataOutput bufferedOutput, int dictLength, 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:DocValuesConsumerWrites pre-sorted numeric docvalues for a field- Specified by:
addSortedNumericFieldin classDocValuesConsumer- Parameters:
field- field informationvaluesProducer- produces the values to write- Throws:
IOException- if an I/O error occurred.
-
doAddSortedNumericField
private void doAddSortedNumericField(FieldInfo field, DocValuesProducer valuesProducer, boolean ords) throws IOException - Throws:
IOException
-
isSingleValued
- Throws:
IOException
-
addSortedSetField
Description copied from class:DocValuesConsumerWrites pre-sorted set docvalues for a field- Specified by:
addSortedSetFieldin classDocValuesConsumer- Parameters:
field- field informationvaluesProducer- produces the values to write- Throws:
IOException- if an I/O error occurred.
-