mirror of
https://github.com/lancedb/lancedb.git
synced 2026-10-16 08:42:29 +00:00
Grouping near neighbours together, so an all-pairs comparison runs per bucket instead of over the whole table, needs the partition an IVF index assigns each vector. `ivf_partition(column)` returns that partition, assigned by the centroids and distance type of the IVF index on the column, the way the index path does it: a cosine index assigns by L2 over unit vectors, a Hamming index takes byte vectors, and a vector the assigner cannot place gets no bucket. It is bound when the view is declared and again at every refresh; an index retrain commits a new source version, so the next refresh regroups. A column without an IVF index, or with two, is refused, and so is an index whose segments were trained separately and carry different models or whose metric does not fit the column's element type.