FieldsReader

VectorReader that can wrap multiple delegate readers, selected by field.

Constructors

Link copied to clipboard
constructor(readState: SegmentReadState)

Create a FieldsReader over a segment, opening VectorReaders for each KnnVectorsFormat specified by the indexed numeric vector fields.

Properties

Link copied to clipboard
open override val mergeInstance: KnnVectorsReader

Functions

Link copied to clipboard
open override fun checkIntegrity()

Checks consistency of this reader.

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

Optional: reset or close merge resources used in the reader

Link copied to clipboard
open override fun getByteVectorValues(field: String): ByteVectorValues?

Returns the ByteVectorValues for the given field. The behavior is undefined if the given field doesn't have KNN vectors enabled on its FieldInfo. The return value is never null.

Link copied to clipboard

Return the underlying VectorReader for the given field

Link copied to clipboard
open override fun getFloatVectorValues(field: String): FloatVectorValues?

Returns the FloatVectorValues for the given field. The behavior is undefined if the given field doesn't have KNN vectors enabled on its FieldInfo. The return value is never null.

Link copied to clipboard
open override fun getGraph(field: String): HnswGraph?

Return the stored HnswGraph for the given field.

Link copied to clipboard
open override fun search(field: String, target: ByteArray, knnCollector: KnnCollector, acceptDocs: Bits?)
open override fun search(field: String, target: FloatArray, knnCollector: KnnCollector, acceptDocs: Bits?)

Return the k nearest neighbor documents as determined by comparison of their vector values for this field, to the given vector, by the field's similarity function. The score of each document is derived from the vector similarity in a way that ensures scores are positive and that a larger score corresponds to a higher ranking.