Module org.apache.lucene.core
Class PerFieldDocValuesFormat.FieldsWriter
java.lang.Object
org.apache.lucene.codecs.DocValuesConsumer
org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat.FieldsWriter
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
PerFieldDocValuesFormat
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<DocValuesFormat, PerFieldDocValuesFormat.ConsumerAndSuffix> private final SegmentWriteState -
Constructor Summary
Constructors -
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 fieldvoidclose()private DocValuesConsumergetInstance(FieldInfo field) private DocValuesConsumergetInstance(FieldInfo field, boolean ignoreCurrentFormat) DocValuesConsumer for the given field.voidmerge(MergeState mergeState) Merges in the fields from the readers inmergeState.Methods inherited from class org.apache.lucene.codecs.DocValuesConsumer
isSingleValued, mergeBinaryField, mergeNumericField, mergeSortedField, mergeSortedNumericField, mergeSortedSetField, singletonView
-
Field Details
-
formats
-
suffixes
-
segmentWriteState
-
-
Constructor Details
-
FieldsWriter
-
-
Method Details
-
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.
-
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.
-
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.
-
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.
-
merge
Description copied from class:DocValuesConsumerMerges in the fields from the readers inmergeState. The default implementation callsDocValuesConsumer.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), orDocValuesConsumer.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).- Overrides:
mergein classDocValuesConsumer- Throws:
IOException
-
getInstance
- Throws:
IOException
-
getInstance
private DocValuesConsumer getInstance(FieldInfo field, boolean ignoreCurrentFormat) throws IOException DocValuesConsumer for the given field.- Parameters:
field- - FieldInfo object.ignoreCurrentFormat- - ignore the existing format attributes.- Returns:
- DocValuesConsumer for the field.
- Throws:
IOException- if there is a low-level IO error
-
close
- Throws:
IOException
-