PerFieldKnnVectorsFormat

Enables per field numeric vector support.

Note, when extending this class, the name (.getName) is written into the index. In order for the field to be read, the name must resolve to your implementation via .forName. This method uses Java's ServiceLoader to resolve format names.

Files written by each numeric vectors format have an additional suffix containing the format name. For example, in a per-field configuration instead of _1.dat filenames would look like _1_Lucene40_0.dat.

See also

ServiceLoader

Types

Link copied to clipboard
object Companion
Link copied to clipboard

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

Properties

Link copied to clipboard
open lateinit override var name: String

Functions

Link copied to clipboard

Returns a KnnVectorsReader to read the vectors from the index.

Link copied to clipboard

Returns a KnnVectorsWriter to write the vectors to the index.

Link copied to clipboard

Returns the numeric vector format that should be used for writing new segments of field * .

Link copied to clipboard
open override fun getMaxDimensions(fieldName: String): Int

Returns the maximum number of vector dimensions supported by this codec for the given field name