Documentation
¶
Index ¶
- func GetVersion(sqlproc *sqlexec.SqlProcess, tblcfg vectorindex.IndexTableConfig) (int64, error)
- type IvfflatSearch
- func (s *IvfflatSearch[T]) Contains(key int64) (bool, error)
- func (s *IvfflatSearch[T]) Destroy()
- func (s *IvfflatSearch[T]) Load(sqlproc *sqlexec.SqlProcess) error
- func (s *IvfflatSearch[T]) Search(sqlproc *sqlexec.SqlProcess, anyquery any, rt vectorindex.RuntimeConfig) (keys any, distances []float64, err error)
- func (s *IvfflatSearch[T]) SearchFloat32(proc *sqlexec.SqlProcess, query any, rt vectorindex.RuntimeConfig, ...) error
- func (s *IvfflatSearch[T]) UpdateConfig(newalgo cache.VectorIndexSearchIf) error
- type IvfflatSearchIndex
- func (idx *IvfflatSearchIndex[T]) Destroy()
- func (idx *IvfflatSearchIndex[T]) LoadCentroids(proc *sqlexec.SqlProcess, idxcfg vectorindex.IndexConfig, ...) error
- func (idx *IvfflatSearchIndex[T]) LoadIndex(proc *sqlexec.SqlProcess, idxcfg vectorindex.IndexConfig, ...) (err error)
- func (idx *IvfflatSearchIndex[T]) Search(sqlproc *sqlexec.SqlProcess, idxcfg vectorindex.IndexConfig, ...) (keys any, distances []float64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVersion ¶
func GetVersion(sqlproc *sqlexec.SqlProcess, tblcfg vectorindex.IndexTableConfig) (int64, error)
Types ¶
type IvfflatSearch ¶
type IvfflatSearch[T types.RealNumbers] struct { Idxcfg vectorindex.IndexConfig Tblcfg vectorindex.IndexTableConfig Index *IvfflatSearchIndex[T] ThreadsSearch int64 }
This is the Ivf search implementation that implement VectorIndexSearchIf interface
func NewIvfflatSearch ¶
func NewIvfflatSearch[T types.RealNumbers]( idxcfg vectorindex.IndexConfig, tblcfg vectorindex.IndexTableConfig, ) *IvfflatSearch[T]
func (*IvfflatSearch[T]) Destroy ¶
func (s *IvfflatSearch[T]) Destroy()
Destroy IvfflatSearch (implement VectorIndexSearch.Destroy)
func (*IvfflatSearch[T]) Load ¶
func (s *IvfflatSearch[T]) Load(sqlproc *sqlexec.SqlProcess) error
load index from database (implement VectorIndexSearch.LoadFromDatabase)
func (*IvfflatSearch[T]) Search ¶
func (s *IvfflatSearch[T]) Search( sqlproc *sqlexec.SqlProcess, anyquery any, rt vectorindex.RuntimeConfig, ) (keys any, distances []float64, err error)
Search the hnsw index (implement VectorIndexSearch.Search)
func (*IvfflatSearch[T]) SearchFloat32 ¶
func (s *IvfflatSearch[T]) SearchFloat32(proc *sqlexec.SqlProcess, query any, rt vectorindex.RuntimeConfig, outKeys []int64, outDists []float32) error
check config and update some parameters such as ef_search
func (*IvfflatSearch[T]) UpdateConfig ¶
func (s *IvfflatSearch[T]) UpdateConfig(newalgo cache.VectorIndexSearchIf) error
type IvfflatSearchIndex ¶
type IvfflatSearchIndex[T types.RealNumbers] struct { Version int64 Centroids cache.VectorIndexSearchIf }
Ivf search index struct to hold the usearch index
func (*IvfflatSearchIndex[T]) Destroy ¶
func (idx *IvfflatSearchIndex[T]) Destroy()
func (*IvfflatSearchIndex[T]) LoadCentroids ¶
func (idx *IvfflatSearchIndex[T]) LoadCentroids(proc *sqlexec.SqlProcess, idxcfg vectorindex.IndexConfig, tblcfg vectorindex.IndexTableConfig, nthread int64) error
func (*IvfflatSearchIndex[T]) LoadIndex ¶
func (idx *IvfflatSearchIndex[T]) LoadIndex(proc *sqlexec.SqlProcess, idxcfg vectorindex.IndexConfig, tblcfg vectorindex.IndexTableConfig, nthread int64) (err error)
func (*IvfflatSearchIndex[T]) Search ¶
func (idx *IvfflatSearchIndex[T]) Search( sqlproc *sqlexec.SqlProcess, idxcfg vectorindex.IndexConfig, tblcfg vectorindex.IndexTableConfig, query []T, rt vectorindex.RuntimeConfig, nthread int64, ) (keys any, distances []float64, err error)
Call usearch.Search
Directories
¶
| Path | Synopsis |
|---|---|
|
Package plugin is the IVF-FLAT vector index plugin registration point.
|
Package plugin is the IVF-FLAT vector index plugin registration point. |
|
compile
Package compile implements the IVF-FLAT plugin's compile-layer (DDL) hooks.
|
Package compile implements the IVF-FLAT plugin's compile-layer (DDL) hooks. |
|
idxcron
Package idxcron is IVF-FLAT's idxcron hook implementation.
|
Package idxcron is IVF-FLAT's idxcron hook implementation. |
|
iscp
Package iscp provides IVF-FLAT's ISCP hook layer.
|
Package iscp provides IVF-FLAT's ISCP hook layer. |
|
plan
Package plan implements the Ivfflat plugin's plan-layer hooks.
|
Package plan implements the Ivfflat plugin's plan-layer hooks. |
|
runtime
Package runtime holds IVF-FLAT's catalog-side metadata: hidden-table types, parameter schema, op-type set, default options, sync descriptor.
|
Package runtime holds IVF-FLAT's catalog-side metadata: hidden-table types, parameter schema, op-type set, default options, sync descriptor. |
Click to show internal directories.
Click to hide internal directories.