Lucene99HnswVectorsWriter

class Lucene99HnswVectorsWriter(state: SegmentWriteState, M: Int, beamWidth: Int, flatVectorWriter: FlatVectorsWriter, numMergeWorkers: Int, mergeExec: TaskExecutor?) : KnnVectorsWriter

Writes vector values and knn graphs to index segments.

Constructors

Link copied to clipboard
constructor(state: SegmentWriteState, M: Int, beamWidth: Int, flatVectorWriter: FlatVectorsWriter, numMergeWorkers: Int, mergeExec: TaskExecutor?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).

Functions

Link copied to clipboard
open override fun addField(fieldInfo: FieldInfo): KnnFieldVectorsWriter<*>

Add new field for indexing

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun finish()

Called once at the end before close

Link copied to clipboard
open override fun flush(maxDoc: Int, sortMap: Sorter.DocMap?)

Flush all buffered data on disk *

Link copied to clipboard
fun merge(mergeState: MergeState)

Merges the segment vectors for all fields. This default implementation delegates to .mergeOneField, passing a KnnVectorsReader that combines the vector values and ignores deleted documents.

Link copied to clipboard
open override fun mergeOneField(fieldInfo: FieldInfo, mergeState: MergeState)

Write field for merging

Link copied to clipboard
open override fun ramBytesUsed(): Long

Return the memory usage of this object in bytes. Negative values are illegal.