VectorIndexConfiguration

actual class VectorIndexConfiguration(expression: String, dimensions: Long, centroids: Long) : IndexConfiguration(source)
expect class VectorIndexConfiguration(expression: String, dimensions: Long, centroids: Long) : IndexConfiguration(source)

Configuration for creating vector indexes.

Parameters

expression

The SQL++ expression returning a vector which is an array of numbers.

dimensions

The number of dimensions of the vectors to be indexed. The vectors that do not have the same dimensions specified in the config will not be indexed. The dimensions must be between 2 and 4096 inclusively.

centroids

The number of centroids which is the number buckets to partition the vectors in the index. The number of centroids will be based on the expected number of vectors to be indexed; one suggested rule is to use the square root of the number of vectors. The centroids must be between 1 and 64000 inclusively.

actual class VectorIndexConfiguration(expression: String, dimensions: Long, centroids: Long) : IndexConfiguration(source)
actual class VectorIndexConfiguration(val expression: String, val dimensions: Long, val centroids: Long) : IndexConfiguration(source)

Constructors

Link copied to clipboard
actual constructor(expression: String, dimensions: Long, centroids: Long)
expect constructor(expression: String, dimensions: Long, centroids: Long)

VectorIndexConfiguration Constructor.

actual constructor(expression: String, dimensions: Long, centroids: Long)
actual constructor(expression: String, dimensions: Long, centroids: Long)

Types

Link copied to clipboard

Distance metric to be used in the vector indexes.

Properties

Link copied to clipboard
actual val centroids: Long
expect val centroids: Long

The number of centroids which is the number buckets into which to partition the vectors in the index.

actual val centroids: Long
actual val centroids: Long
Link copied to clipboard
actual val dimensions: Long
expect val dimensions: Long

The number of vector dimensions.

actual val dimensions: Long
actual val dimensions: Long
Link copied to clipboard

Vector encoding type.

Link copied to clipboard
actual val expression: String
expect val expression: String

The SQL++ expression returning a vector which is an array of 32-bits floating-point numbers or a Base64 string representing an array of 32-bits floating-point numbers in little-endian format.

actual val expression: String
actual val expression: String
Link copied to clipboard
actual val expressions: List<String>
expect val expressions: List<String>
actual val expressions: List<String>
actual val expressions: List<String>
Link copied to clipboard
actual var isLazy: Boolean
expect var isLazy: Boolean

The boolean flag indicating that index is lazy or not. The default value is false.

actual var isLazy: Boolean
actual var isLazy: Boolean
Link copied to clipboard
actual var maxTrainingSize: Long
expect var maxTrainingSize: Long

The maximum number of vectors used for training the index. The default value is zero, meaning that the maxTrainingSize will be automatically calulated by the index based on the number of centroids specified, encoding types, and the encoding parameters.

actual var maxTrainingSize: Long
actual var maxTrainingSize: Long
Link copied to clipboard
Link copied to clipboard
actual var minTrainingSize: Long
expect var minTrainingSize: Long

The minimum number of vectors for training the index. The default value is zero, meaning that minTrainingSize will be automatically calculated by the index based on the number of centroids specified, encoding types, and the encoding parameters.

actual var minTrainingSize: Long
actual var minTrainingSize: Long
Link copied to clipboard
actual var numProbes: Long
expect var numProbes: Long

The number of centroids that will be scanned during a query. The default value is zero, meaning that the numProbes will be automatically calulated by the index based on the number of centroids specified

actual var numProbes: Long
actual var numProbes: Long

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
Link copied to clipboard

Vector encoding type.

Link copied to clipboard

The boolean flag indicating that index is lazy or not. The default value is false.

Link copied to clipboard
actual fun setMaxTrainingSize(maxTrainingSize: Long): VectorIndexConfiguration
expect fun setMaxTrainingSize(maxTrainingSize: Long): VectorIndexConfiguration

The maximum number of vectors used for training the index. The default value is zero, meaning that the maxTrainingSize will be automatically calulated by the index based on the number of centroids specified, encoding types, and the encoding parameters.

actual fun setMaxTrainingSize(maxTrainingSize: Long): VectorIndexConfiguration
actual fun setMaxTrainingSize(maxTrainingSize: Long): VectorIndexConfiguration
Link copied to clipboard
actual fun setMinTrainingSize(minTrainingSize: Long): VectorIndexConfiguration
expect fun setMinTrainingSize(minTrainingSize: Long): VectorIndexConfiguration

The minimum number of vectors for training the index. The default value is zero, meaning that minTrainingSize will be automatically calculated by the index based on the number of centroids specified, encoding types, and the encoding parameters.

actual fun setMinTrainingSize(minTrainingSize: Long): VectorIndexConfiguration
actual fun setMinTrainingSize(minTrainingSize: Long): VectorIndexConfiguration
Link copied to clipboard

The number of centroids that will be scanned during a query. The default value is zero, meaning that the numProbes will be automatically calulated by the index based on the number of centroids specified

Link copied to clipboard
open override fun toString(): String
open override fun toString(): String