DocValuesConsumer

Abstract API that consumes numeric, binary and sorted docvalues. Concrete implementations of this actually do "something" with the docvalues (write it into the index in a specific format).

The lifecycle is:

  1. DocValuesConsumer is created by DocValuesFormat.fieldsConsumer.

  2. .addNumericField, .addBinaryField, .addSortedField, .addSortedSetField, or .addSortedNumericField are called for each Numeric, Binary, Sorted, SortedSet, or SortedNumeric docvalues field. The API is a "pull" rather than "push", and the implementation is free to iterate over the values multiple times ( ).

  3. After all fields are added, the consumer is .closed.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun addBinaryField(field: FieldInfo, valuesProducer: DocValuesProducer)

Writes binary docvalues for a field.

Link copied to clipboard
abstract fun addNumericField(field: FieldInfo, valuesProducer: DocValuesProducer)

Writes numeric docvalues for a field.

Link copied to clipboard
abstract fun addSortedField(field: FieldInfo, valuesProducer: DocValuesProducer)

Writes pre-sorted binary docvalues for a field.

Link copied to clipboard
abstract fun addSortedNumericField(field: FieldInfo, valuesProducer: DocValuesProducer)

Writes pre-sorted numeric docvalues for a field

Link copied to clipboard
abstract fun addSortedSetField(field: FieldInfo, valuesProducer: DocValuesProducer)

Writes pre-sorted set docvalues for a field

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
open fun merge(mergeState: MergeState)

Merges in the fields from the readers in mergeState. The default implementation calls .mergeNumericField, .mergeBinaryField, .mergeSortedField, .mergeSortedSetField, or .mergeSortedNumericField for each field, depending on its type. Implementations can override this method for more sophisticated merging (bulk-byte copying, etc).

Link copied to clipboard
fun mergeBinaryField(mergeFieldInfo: FieldInfo, mergeState: MergeState)

Merges the binary docvalues from MergeState.

Link copied to clipboard
fun mergeNumericField(mergeFieldInfo: FieldInfo, mergeState: MergeState)

Merges the numeric docvalues from MergeState.

Link copied to clipboard
fun mergeSortedField(fieldInfo: FieldInfo, mergeState: MergeState)

Merges the sorted docvalues from toMerge.

Link copied to clipboard
fun mergeSortedNumericField(mergeFieldInfo: FieldInfo, mergeState: MergeState)

Merges the sorted docvalues from toMerge.

Link copied to clipboard
fun mergeSortedSetField(mergeFieldInfo: FieldInfo, mergeState: MergeState)

Merges the sortedset docvalues from toMerge.