Class Lucene70DocValuesConsumer
- java.lang.Object
-
- org.apache.lucene.codecs.DocValuesConsumer
-
- org.apache.lucene.codecs.lucene70.Lucene70DocValuesConsumer
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
final class Lucene70DocValuesConsumer extends DocValuesConsumer implements java.io.Closeable
writer forLucene70DocValuesFormat
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classLucene70DocValuesConsumer.MinMaxTracker
-
Field Summary
Fields Modifier and Type Field Description (package private) IndexOutputdata(package private) intmaxDoc(package private) IndexOutputmeta
-
Constructor Summary
Constructors Constructor Description Lucene70DocValuesConsumer(SegmentWriteState state, java.lang.String dataCodec, java.lang.String dataExtension, java.lang.String metaCodec, java.lang.String metaExtension)expert: Creates a new writer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBinaryField(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)voidclose()private voiddoAddSortedField(FieldInfo field, DocValuesProducer valuesProducer)private voidwriteBlock(long[] values, int length, long gcd, GrowableByteArrayDataOutput buffer)private voidwriteTermsIndex(SortedSetDocValues values)private long[]writeValues(FieldInfo field, DocValuesProducer valuesProducer)private voidwriteValuesMultipleBlocks(SortedNumericDocValues values, long gcd)private voidwriteValuesSingleBlock(SortedNumericDocValues values, long numValues, int numBitsPerValue, long min, long gcd, java.util.Map<java.lang.Long,java.lang.Integer> encode)-
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
-
Lucene70DocValuesConsumer
public Lucene70DocValuesConsumer(SegmentWriteState state, java.lang.String dataCodec, java.lang.String dataExtension, java.lang.String metaCodec, java.lang.String metaExtension) throws java.io.IOException
expert: Creates a new writer- Throws:
java.io.IOException
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
addNumericField
public void addNumericField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumerWrites numeric docvalues for a field.- Specified by:
addNumericFieldin classDocValuesConsumer- Parameters:
field- field informationvaluesProducer- Numeric values to write.- Throws:
java.io.IOException- if an I/O error occurred.
-
writeValues
private long[] writeValues(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
- Throws:
java.io.IOException
-
writeValuesSingleBlock
private void writeValuesSingleBlock(SortedNumericDocValues values, long numValues, int numBitsPerValue, long min, long gcd, java.util.Map<java.lang.Long,java.lang.Integer> encode) throws java.io.IOException
- Throws:
java.io.IOException
-
writeValuesMultipleBlocks
private void writeValuesMultipleBlocks(SortedNumericDocValues values, long gcd) throws java.io.IOException
- Throws:
java.io.IOException
-
writeBlock
private void writeBlock(long[] values, int length, long gcd, GrowableByteArrayDataOutput buffer) throws java.io.IOException- Throws:
java.io.IOException
-
addBinaryField
public void addBinaryField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
Description copied from class:DocValuesConsumerWrites binary docvalues for a field.- Specified by:
addBinaryFieldin classDocValuesConsumer- Parameters:
field- field informationvaluesProducer- Binary values to write.- Throws:
java.io.IOException- if an I/O error occurred.
-
addSortedField
public void addSortedField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
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:
java.io.IOException- if an I/O error occurred.
-
doAddSortedField
private void doAddSortedField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
- Throws:
java.io.IOException
-
addTermsDict
private void addTermsDict(SortedSetDocValues values) throws java.io.IOException
- Throws:
java.io.IOException
-
writeTermsIndex
private void writeTermsIndex(SortedSetDocValues values) throws java.io.IOException
- Throws:
java.io.IOException
-
addSortedNumericField
public void addSortedNumericField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.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:
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:DocValuesConsumerWrites pre-sorted set docvalues for a field- Specified by:
addSortedSetFieldin classDocValuesConsumer- Parameters:
field- field informationvaluesProducer- produces the values to write- Throws:
java.io.IOException- if an I/O error occurred.
-
-