private class PerFieldDocValuesFormat.FieldsWriter extends DocValuesConsumer
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<DocValuesFormat,PerFieldDocValuesFormat.ConsumerAndSuffix> |
formats |
private SegmentWriteState |
segmentWriteState |
private java.util.Map<java.lang.String,java.lang.Integer> |
suffixes |
| Constructor and Description |
|---|
FieldsWriter(SegmentWriteState state) |
| Modifier and Type | Method and Description |
|---|---|
void |
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 field
|
void |
addSortedSetField(FieldInfo field,
DocValuesProducer valuesProducer)
Writes pre-sorted set docvalues for a field
|
void |
close() |
private DocValuesConsumer |
getInstance(FieldInfo field) |
private DocValuesConsumer |
getInstance(FieldInfo field,
boolean ignoreCurrentFormat)
DocValuesConsumer for the given field.
|
void |
merge(MergeState mergeState)
Merges in the fields from the readers in
mergeState. |
isSingleValued, mergeBinaryField, mergeNumericField, mergeSortedField, mergeSortedNumericField, mergeSortedSetField, singletonViewprivate final java.util.Map<DocValuesFormat,PerFieldDocValuesFormat.ConsumerAndSuffix> formats
private final java.util.Map<java.lang.String,java.lang.Integer> suffixes
private final SegmentWriteState segmentWriteState
public FieldsWriter(SegmentWriteState state)
public void addNumericField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
DocValuesConsumeraddNumericField in class DocValuesConsumerfield - field informationvaluesProducer - Numeric values to write.java.io.IOException - if an I/O error occurred.public void addBinaryField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
DocValuesConsumeraddBinaryField in class DocValuesConsumerfield - field informationvaluesProducer - Binary values to write.java.io.IOException - if an I/O error occurred.public void addSortedField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
DocValuesConsumeraddSortedField in class DocValuesConsumerfield - field informationvaluesProducer - produces the values and ordinals to writejava.io.IOException - if an I/O error occurred.public void addSortedNumericField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
DocValuesConsumeraddSortedNumericField in class DocValuesConsumerfield - field informationvaluesProducer - produces the values to writejava.io.IOException - if an I/O error occurred.public void addSortedSetField(FieldInfo field, DocValuesProducer valuesProducer) throws java.io.IOException
DocValuesConsumeraddSortedSetField in class DocValuesConsumerfield - field informationvaluesProducer - produces the values to writejava.io.IOException - if an I/O error occurred.public void merge(MergeState mergeState) throws java.io.IOException
DocValuesConsumermergeState. The default implementation
calls DocValuesConsumer.mergeNumericField(org.apache.lucene.index.FieldInfo, org.apache.lucene.index.MergeState), DocValuesConsumer.mergeBinaryField(org.apache.lucene.index.FieldInfo, org.apache.lucene.index.MergeState),
DocValuesConsumer.mergeSortedField(org.apache.lucene.index.FieldInfo, org.apache.lucene.index.MergeState), DocValuesConsumer.mergeSortedSetField(org.apache.lucene.index.FieldInfo, org.apache.lucene.index.MergeState),
or DocValuesConsumer.mergeSortedNumericField(org.apache.lucene.index.FieldInfo, org.apache.lucene.index.MergeState) for each field,
depending on its type.
Implementations can override this method
for more sophisticated merging (bulk-byte copying, etc).merge in class DocValuesConsumerjava.io.IOExceptionprivate DocValuesConsumer getInstance(FieldInfo field) throws java.io.IOException
java.io.IOExceptionprivate DocValuesConsumer getInstance(FieldInfo field, boolean ignoreCurrentFormat) throws java.io.IOException
field - - FieldInfo object.ignoreCurrentFormat - - ignore the existing format attributes.java.io.IOException - if there is a low-level IO errorpublic void close()
throws java.io.IOException
java.io.IOException