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,
java.lang.Iterable<BytesRef> values)
Writes binary docvalues for a field.
|
void |
addNumericField(FieldInfo field,
java.lang.Iterable<java.lang.Number> values)
Writes numeric docvalues for a field.
|
void |
addSortedField(FieldInfo field,
java.lang.Iterable<BytesRef> values,
java.lang.Iterable<java.lang.Number> docToOrd)
Writes pre-sorted binary docvalues for a field.
|
void |
addSortedNumericField(FieldInfo field,
java.lang.Iterable<java.lang.Number> docToValueCount,
java.lang.Iterable<java.lang.Number> values)
Writes pre-sorted numeric docvalues for a field
|
void |
addSortedSetField(FieldInfo field,
java.lang.Iterable<BytesRef> values,
java.lang.Iterable<java.lang.Number> docToOrdCount,
java.lang.Iterable<java.lang.Number> ords)
Writes pre-sorted set docvalues for a field
|
void |
close() |
private DocValuesConsumer |
getInstance(FieldInfo field) |
isSingleValued, merge, mergeBinaryField, mergeNumericField, mergeSortedField, mergeSortedNumericField, mergeSortedSetField, singletonView
private 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, java.lang.Iterable<java.lang.Number> values) throws java.io.IOException
DocValuesConsumer
addNumericField
in class DocValuesConsumer
field
- field informationvalues
- Iterable of numeric values (one for each document). null
indicates
a missing value.java.io.IOException
- if an I/O error occurred.public void addBinaryField(FieldInfo field, java.lang.Iterable<BytesRef> values) throws java.io.IOException
DocValuesConsumer
addBinaryField
in class DocValuesConsumer
field
- field informationvalues
- Iterable of binary values (one for each document). null
indicates
a missing value.java.io.IOException
- if an I/O error occurred.public void addSortedField(FieldInfo field, java.lang.Iterable<BytesRef> values, java.lang.Iterable<java.lang.Number> docToOrd) throws java.io.IOException
DocValuesConsumer
addSortedField
in class DocValuesConsumer
field
- field informationvalues
- Iterable of binary values in sorted order (deduplicated).docToOrd
- Iterable of ordinals (one for each document). -1
indicates
a missing value.java.io.IOException
- if an I/O error occurred.public void addSortedNumericField(FieldInfo field, java.lang.Iterable<java.lang.Number> docToValueCount, java.lang.Iterable<java.lang.Number> values) throws java.io.IOException
DocValuesConsumer
addSortedNumericField
in class DocValuesConsumer
field
- field informationdocToValueCount
- Iterable of the number of values for each document. A zero
count indicates a missing value.values
- Iterable of numeric values in sorted order (not deduplicated).java.io.IOException
- if an I/O error occurred.public void addSortedSetField(FieldInfo field, java.lang.Iterable<BytesRef> values, java.lang.Iterable<java.lang.Number> docToOrdCount, java.lang.Iterable<java.lang.Number> ords) throws java.io.IOException
DocValuesConsumer
addSortedSetField
in class DocValuesConsumer
field
- field informationvalues
- Iterable of binary values in sorted order (deduplicated).docToOrdCount
- Iterable of the number of values for each document. A zero ordinal
count indicates a missing value.ords
- Iterable of ordinal occurrences (docToOrdCount*maxDoc total).java.io.IOException
- if an I/O error occurred.private DocValuesConsumer getInstance(FieldInfo field) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException