FieldUpdatesBuffer

This class efficiently buffers numeric and binary field updates and stores terms, values and metadata in a memory efficient way without creating large amounts of objects. Update terms are stored without de-duplicating the update term. In general we try to optimize for several use-cases. For instance we try to use constant space for update terms field since the common case always updates on the same field. Also for docUpTo we try to optimize for the case when updates should be applied to all docs ie. docUpTo=Integer.MAX_VALUE. In other cases each update will likely have a different docUpTo. Along the same lines this impl optimizes the case when all updates have a value. Lastly, if all updates share the same value for a numeric field we only store the value once.

Constructors

Link copied to clipboard
constructor(bytesUsed: Counter, initialValue: DocValuesUpdate.NumericDocValuesUpdate, docUpTo: Int)
constructor(bytesUsed: Counter, initialValue: DocValuesUpdate.BinaryDocValuesUpdate, docUpTo: Int)

Types

Link copied to clipboard

Struct like class that is used to iterate over all updates in this buffer

Link copied to clipboard

An iterator that iterates over all updates in insertion order

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun add(field: String, docUpTo: Int, ord: Int, hasValue: Boolean)
Link copied to clipboard
fun addNoValue(term: Term, docUpTo: Int)
Link copied to clipboard
fun addUpdate(term: Term, value: Long, docUpTo: Int)
fun addUpdate(term: Term, value: BytesRef?, docUpTo: Int)
Link copied to clipboard
fun finish()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard