VectorIndexSpec class

Declarative description of a vector index attached to a (table, column) pair. Passed to Database.createVectorIndex and returned by Database.vectorIndexes.

All algorithm parameters carry FAISS-conventional names and default to values matching the underlying index class:

rescoreFactor controls two-stage retrieval. When > 1, the planner fetches k * rescoreFactor candidates from the index, then rescores them with the exact metric against the original (uncompressed) row blobs before returning the true top-k. Essential for approximate indexes (LSH, PQ, IvfPq) where the index metric is lossy.

Constructors

VectorIndexSpec({required String table, required String column, required int dim, VectorIndexKind kind = VectorIndexKind.flat, VectorMetric metric = VectorMetric.l2sq, int m = 16, int efConstruction = 40, int efSearch = 16, int nlist = 0, int nprobe = 1, int nbits = 64, int rescoreFactor = 1, int seed = 1234, List<String> filterColumns = const []})
const

Properties

column String
final
dim int
final
efConstruction int
final
efSearch int
final
filterColumns List<String>
V36: columns on the same row eligible for payload-index-driven filter pruning at KNN time. Equality-only WHERE clauses on these columns produce a pre-computed row-set that the KNN candidate list is intersected against — turning the O(N) filter attrition of V11 over-fetch into O(1) set lookup + O(k) intersection.
final
hashCode int
The hash code for this object.
no setterinherited
kind VectorIndexKind
final
m int
final
metric VectorMetric
final
nbits int
final
nlist int
final
nprobe int
final
rescoreFactor int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seed int
final
table String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited