Documentation
¶
Index ¶
- func New(cfg Config, uc ent.UserConfig, store *lsmkv.Store) (*dynamic, error)
- func ValidateUserConfigUpdate(initial, updated schemaconfig.VectorIndexConfig) error
- type Config
- type DynamicStats
- type Index
- type MockIndex
- type MockIndex_Expecter
- type MockIndex_IsUpgraded_Call
- type MockIndex_UnderlyingIndex_Call
- func (_c *MockIndex_UnderlyingIndex_Call) Return(_a0 common.IndexType) *MockIndex_UnderlyingIndex_Call
- func (_c *MockIndex_UnderlyingIndex_Call) Run(run func()) *MockIndex_UnderlyingIndex_Call
- func (_c *MockIndex_UnderlyingIndex_Call) RunAndReturn(run func() common.IndexType) *MockIndex_UnderlyingIndex_Call
- type MockVectorIndex
- func (_m *MockVectorIndex) Add(ctx context.Context, id uint64, vector []float32) error
- func (_m *MockVectorIndex) AddBatch(ctx context.Context, id []uint64, vector [][]float32) error
- func (_m *MockVectorIndex) Compressed() bool
- func (_m *MockVectorIndex) ContainsDoc(docID uint64) bool
- func (_m *MockVectorIndex) Delete(id ...uint64) error
- func (_m *MockVectorIndex) Drop(ctx context.Context, keepFiles bool) error
- func (_m *MockVectorIndex) EXPECT() *MockVectorIndex_Expecter
- func (_m *MockVectorIndex) Flush() error
- func (_m *MockVectorIndex) Iterate(fn func(uint64) bool)
- func (_m *MockVectorIndex) ListFiles(ctx context.Context, basePath string) ([]string, error)
- func (_m *MockVectorIndex) Multivector() bool
- func (_m *MockVectorIndex) PostStartup(ctx context.Context)
- func (_m *MockVectorIndex) Preload(id uint64, vector []float32)
- func (_m *MockVectorIndex) QueryVectorDistancer(queryVector []float32) common.QueryVectorDistancer
- func (_m *MockVectorIndex) SearchByVector(ctx context.Context, vector []float32, k int, allow helpers.AllowList) ([]uint64, []float32, error)
- func (_m *MockVectorIndex) SearchByVectorDistance(ctx context.Context, vector []float32, dist float32, maxLimit int64, ...) ([]uint64, []float32, error)
- func (_m *MockVectorIndex) Shutdown(ctx context.Context) error
- func (_m *MockVectorIndex) SwitchCommitLogs(ctx context.Context) error
- func (_m *MockVectorIndex) Type() common.IndexType
- func (_m *MockVectorIndex) UpdateUserConfig(updated config.VectorIndexConfig, callback func()) error
- func (_m *MockVectorIndex) ValidateBeforeInsert(vector []float32) error
- type MockVectorIndex_AddBatch_Call
- func (_c *MockVectorIndex_AddBatch_Call) Return(_a0 error) *MockVectorIndex_AddBatch_Call
- func (_c *MockVectorIndex_AddBatch_Call) Run(run func(ctx context.Context, id []uint64, vector [][]float32)) *MockVectorIndex_AddBatch_Call
- func (_c *MockVectorIndex_AddBatch_Call) RunAndReturn(run func(context.Context, []uint64, [][]float32) error) *MockVectorIndex_AddBatch_Call
- type MockVectorIndex_Add_Call
- func (_c *MockVectorIndex_Add_Call) Return(_a0 error) *MockVectorIndex_Add_Call
- func (_c *MockVectorIndex_Add_Call) Run(run func(ctx context.Context, id uint64, vector []float32)) *MockVectorIndex_Add_Call
- func (_c *MockVectorIndex_Add_Call) RunAndReturn(run func(context.Context, uint64, []float32) error) *MockVectorIndex_Add_Call
- type MockVectorIndex_Compressed_Call
- type MockVectorIndex_ContainsDoc_Call
- func (_c *MockVectorIndex_ContainsDoc_Call) Return(_a0 bool) *MockVectorIndex_ContainsDoc_Call
- func (_c *MockVectorIndex_ContainsDoc_Call) Run(run func(docID uint64)) *MockVectorIndex_ContainsDoc_Call
- func (_c *MockVectorIndex_ContainsDoc_Call) RunAndReturn(run func(uint64) bool) *MockVectorIndex_ContainsDoc_Call
- type MockVectorIndex_Delete_Call
- type MockVectorIndex_Drop_Call
- func (_c *MockVectorIndex_Drop_Call) Return(_a0 error) *MockVectorIndex_Drop_Call
- func (_c *MockVectorIndex_Drop_Call) Run(run func(ctx context.Context, keepFiles bool)) *MockVectorIndex_Drop_Call
- func (_c *MockVectorIndex_Drop_Call) RunAndReturn(run func(context.Context, bool) error) *MockVectorIndex_Drop_Call
- type MockVectorIndex_Expecter
- func (_e *MockVectorIndex_Expecter) Add(ctx interface{}, id interface{}, vector interface{}) *MockVectorIndex_Add_Call
- func (_e *MockVectorIndex_Expecter) AddBatch(ctx interface{}, id interface{}, vector interface{}) *MockVectorIndex_AddBatch_Call
- func (_e *MockVectorIndex_Expecter) Compressed() *MockVectorIndex_Compressed_Call
- func (_e *MockVectorIndex_Expecter) ContainsDoc(docID interface{}) *MockVectorIndex_ContainsDoc_Call
- func (_e *MockVectorIndex_Expecter) Delete(id ...interface{}) *MockVectorIndex_Delete_Call
- func (_e *MockVectorIndex_Expecter) Drop(ctx interface{}, keepFiles interface{}) *MockVectorIndex_Drop_Call
- func (_e *MockVectorIndex_Expecter) Flush() *MockVectorIndex_Flush_Call
- func (_e *MockVectorIndex_Expecter) Iterate(fn interface{}) *MockVectorIndex_Iterate_Call
- func (_e *MockVectorIndex_Expecter) ListFiles(ctx interface{}, basePath interface{}) *MockVectorIndex_ListFiles_Call
- func (_e *MockVectorIndex_Expecter) Multivector() *MockVectorIndex_Multivector_Call
- func (_e *MockVectorIndex_Expecter) PostStartup(ctx interface{}) *MockVectorIndex_PostStartup_Call
- func (_e *MockVectorIndex_Expecter) Preload(id interface{}, vector interface{}) *MockVectorIndex_Preload_Call
- func (_e *MockVectorIndex_Expecter) QueryVectorDistancer(queryVector interface{}) *MockVectorIndex_QueryVectorDistancer_Call
- func (_e *MockVectorIndex_Expecter) SearchByVector(ctx interface{}, vector interface{}, k interface{}, allow interface{}) *MockVectorIndex_SearchByVector_Call
- func (_e *MockVectorIndex_Expecter) SearchByVectorDistance(ctx interface{}, vector interface{}, dist interface{}, maxLimit interface{}, ...) *MockVectorIndex_SearchByVectorDistance_Call
- func (_e *MockVectorIndex_Expecter) Shutdown(ctx interface{}) *MockVectorIndex_Shutdown_Call
- func (_e *MockVectorIndex_Expecter) SwitchCommitLogs(ctx interface{}) *MockVectorIndex_SwitchCommitLogs_Call
- func (_e *MockVectorIndex_Expecter) Type() *MockVectorIndex_Type_Call
- func (_e *MockVectorIndex_Expecter) UpdateUserConfig(updated interface{}, callback interface{}) *MockVectorIndex_UpdateUserConfig_Call
- func (_e *MockVectorIndex_Expecter) ValidateBeforeInsert(vector interface{}) *MockVectorIndex_ValidateBeforeInsert_Call
- type MockVectorIndex_Flush_Call
- type MockVectorIndex_Iterate_Call
- type MockVectorIndex_ListFiles_Call
- func (_c *MockVectorIndex_ListFiles_Call) Return(_a0 []string, _a1 error) *MockVectorIndex_ListFiles_Call
- func (_c *MockVectorIndex_ListFiles_Call) Run(run func(ctx context.Context, basePath string)) *MockVectorIndex_ListFiles_Call
- func (_c *MockVectorIndex_ListFiles_Call) RunAndReturn(run func(context.Context, string) ([]string, error)) *MockVectorIndex_ListFiles_Call
- type MockVectorIndex_Multivector_Call
- type MockVectorIndex_PostStartup_Call
- func (_c *MockVectorIndex_PostStartup_Call) Return() *MockVectorIndex_PostStartup_Call
- func (_c *MockVectorIndex_PostStartup_Call) Run(run func(ctx context.Context)) *MockVectorIndex_PostStartup_Call
- func (_c *MockVectorIndex_PostStartup_Call) RunAndReturn(run func(context.Context)) *MockVectorIndex_PostStartup_Call
- type MockVectorIndex_Preload_Call
- func (_c *MockVectorIndex_Preload_Call) Return() *MockVectorIndex_Preload_Call
- func (_c *MockVectorIndex_Preload_Call) Run(run func(id uint64, vector []float32)) *MockVectorIndex_Preload_Call
- func (_c *MockVectorIndex_Preload_Call) RunAndReturn(run func(uint64, []float32)) *MockVectorIndex_Preload_Call
- type MockVectorIndex_QueryVectorDistancer_Call
- func (_c *MockVectorIndex_QueryVectorDistancer_Call) Return(_a0 common.QueryVectorDistancer) *MockVectorIndex_QueryVectorDistancer_Call
- func (_c *MockVectorIndex_QueryVectorDistancer_Call) Run(run func(queryVector []float32)) *MockVectorIndex_QueryVectorDistancer_Call
- func (_c *MockVectorIndex_QueryVectorDistancer_Call) RunAndReturn(run func([]float32) common.QueryVectorDistancer) *MockVectorIndex_QueryVectorDistancer_Call
- type MockVectorIndex_SearchByVectorDistance_Call
- func (_c *MockVectorIndex_SearchByVectorDistance_Call) Return(_a0 []uint64, _a1 []float32, _a2 error) *MockVectorIndex_SearchByVectorDistance_Call
- func (_c *MockVectorIndex_SearchByVectorDistance_Call) Run(...) *MockVectorIndex_SearchByVectorDistance_Call
- func (_c *MockVectorIndex_SearchByVectorDistance_Call) RunAndReturn(...) *MockVectorIndex_SearchByVectorDistance_Call
- type MockVectorIndex_SearchByVector_Call
- func (_c *MockVectorIndex_SearchByVector_Call) Return(_a0 []uint64, _a1 []float32, _a2 error) *MockVectorIndex_SearchByVector_Call
- func (_c *MockVectorIndex_SearchByVector_Call) Run(...) *MockVectorIndex_SearchByVector_Call
- func (_c *MockVectorIndex_SearchByVector_Call) RunAndReturn(...) *MockVectorIndex_SearchByVector_Call
- type MockVectorIndex_Shutdown_Call
- func (_c *MockVectorIndex_Shutdown_Call) Return(_a0 error) *MockVectorIndex_Shutdown_Call
- func (_c *MockVectorIndex_Shutdown_Call) Run(run func(ctx context.Context)) *MockVectorIndex_Shutdown_Call
- func (_c *MockVectorIndex_Shutdown_Call) RunAndReturn(run func(context.Context) error) *MockVectorIndex_Shutdown_Call
- type MockVectorIndex_SwitchCommitLogs_Call
- func (_c *MockVectorIndex_SwitchCommitLogs_Call) Return(_a0 error) *MockVectorIndex_SwitchCommitLogs_Call
- func (_c *MockVectorIndex_SwitchCommitLogs_Call) Run(run func(ctx context.Context)) *MockVectorIndex_SwitchCommitLogs_Call
- func (_c *MockVectorIndex_SwitchCommitLogs_Call) RunAndReturn(run func(context.Context) error) *MockVectorIndex_SwitchCommitLogs_Call
- type MockVectorIndex_Type_Call
- type MockVectorIndex_UpdateUserConfig_Call
- func (_c *MockVectorIndex_UpdateUserConfig_Call) Return(_a0 error) *MockVectorIndex_UpdateUserConfig_Call
- func (_c *MockVectorIndex_UpdateUserConfig_Call) Run(run func(updated config.VectorIndexConfig, callback func())) *MockVectorIndex_UpdateUserConfig_Call
- func (_c *MockVectorIndex_UpdateUserConfig_Call) RunAndReturn(run func(config.VectorIndexConfig, func()) error) *MockVectorIndex_UpdateUserConfig_Call
- type MockVectorIndex_ValidateBeforeInsert_Call
- func (_c *MockVectorIndex_ValidateBeforeInsert_Call) Return(_a0 error) *MockVectorIndex_ValidateBeforeInsert_Call
- func (_c *MockVectorIndex_ValidateBeforeInsert_Call) Run(run func(vector []float32)) *MockVectorIndex_ValidateBeforeInsert_Call
- func (_c *MockVectorIndex_ValidateBeforeInsert_Call) RunAndReturn(run func([]float32) error) *MockVectorIndex_ValidateBeforeInsert_Call
- type VectorIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateUserConfigUpdate ¶
func ValidateUserConfigUpdate(initial, updated schemaconfig.VectorIndexConfig) error
Types ¶
type Config ¶
type Config struct {
ID string
TargetVector string
Logger logrus.FieldLogger
RootPath string
ShardName string
ClassName string
PrometheusMetrics *monitoring.PrometheusMetrics
VectorForIDThunk common.VectorForID[float32]
GetViewThunk common.GetViewThunk
TempVectorForIDWithViewThunk common.TempVectorForIDWithView[float32]
DistanceProvider distancer.Provider
MakeCommitLoggerThunk hnsw.MakeCommitLogger
TombstoneCallbacks cyclemanager.CycleCallbackGroup
HNSWDisableSnapshots bool
HNSWSnapshotOnStartup bool
HNSWWaitForCachePrefill bool
AllocChecker memwatch.AllocChecker
MakeBucketOptions lsmkv.MakeBucketOptions
AsyncIndexingEnabled bool
}
type DynamicStats ¶ added in v1.25.13
type DynamicStats struct{}
func (*DynamicStats) IndexType ¶ added in v1.25.13
func (s *DynamicStats) IndexType() common.IndexType
type MockIndex ¶ added in v1.32.1
MockIndex is an autogenerated mock type for the Index type
func NewMockIndex ¶ added in v1.32.1
NewMockIndex creates a new instance of MockIndex. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockIndex) EXPECT ¶ added in v1.32.1
func (_m *MockIndex) EXPECT() *MockIndex_Expecter
func (*MockIndex) IsUpgraded ¶ added in v1.32.11
IsUpgraded provides a mock function with no fields
func (*MockIndex) UnderlyingIndex ¶ added in v1.32.1
UnderlyingIndex provides a mock function with no fields
type MockIndex_Expecter ¶ added in v1.32.1
type MockIndex_Expecter struct {
// contains filtered or unexported fields
}
func (*MockIndex_Expecter) IsUpgraded ¶ added in v1.32.11
func (_e *MockIndex_Expecter) IsUpgraded() *MockIndex_IsUpgraded_Call
IsUpgraded is a helper method to define mock.On call
func (*MockIndex_Expecter) UnderlyingIndex ¶ added in v1.32.1
func (_e *MockIndex_Expecter) UnderlyingIndex() *MockIndex_UnderlyingIndex_Call
UnderlyingIndex is a helper method to define mock.On call
type MockIndex_IsUpgraded_Call ¶ added in v1.32.11
MockIndex_IsUpgraded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsUpgraded'
func (*MockIndex_IsUpgraded_Call) Return ¶ added in v1.32.11
func (_c *MockIndex_IsUpgraded_Call) Return(_a0 bool) *MockIndex_IsUpgraded_Call
func (*MockIndex_IsUpgraded_Call) Run ¶ added in v1.32.11
func (_c *MockIndex_IsUpgraded_Call) Run(run func()) *MockIndex_IsUpgraded_Call
func (*MockIndex_IsUpgraded_Call) RunAndReturn ¶ added in v1.32.11
func (_c *MockIndex_IsUpgraded_Call) RunAndReturn(run func() bool) *MockIndex_IsUpgraded_Call
type MockIndex_UnderlyingIndex_Call ¶ added in v1.32.1
MockIndex_UnderlyingIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnderlyingIndex'
func (*MockIndex_UnderlyingIndex_Call) Return ¶ added in v1.32.1
func (_c *MockIndex_UnderlyingIndex_Call) Return(_a0 common.IndexType) *MockIndex_UnderlyingIndex_Call
func (*MockIndex_UnderlyingIndex_Call) Run ¶ added in v1.32.1
func (_c *MockIndex_UnderlyingIndex_Call) Run(run func()) *MockIndex_UnderlyingIndex_Call
func (*MockIndex_UnderlyingIndex_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockIndex_UnderlyingIndex_Call) RunAndReturn(run func() common.IndexType) *MockIndex_UnderlyingIndex_Call
type MockVectorIndex ¶ added in v1.32.1
MockVectorIndex is an autogenerated mock type for the VectorIndex type
func NewMockVectorIndex ¶ added in v1.32.1
func NewMockVectorIndex(t interface {
mock.TestingT
Cleanup(func())
}) *MockVectorIndex
NewMockVectorIndex creates a new instance of MockVectorIndex. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockVectorIndex) Add ¶ added in v1.32.1
Add provides a mock function with given fields: ctx, id, vector
func (*MockVectorIndex) AddBatch ¶ added in v1.32.1
AddBatch provides a mock function with given fields: ctx, id, vector
func (*MockVectorIndex) Compressed ¶ added in v1.32.1
func (_m *MockVectorIndex) Compressed() bool
Compressed provides a mock function with no fields
func (*MockVectorIndex) ContainsDoc ¶ added in v1.32.1
func (_m *MockVectorIndex) ContainsDoc(docID uint64) bool
ContainsDoc provides a mock function with given fields: docID
func (*MockVectorIndex) Delete ¶ added in v1.32.1
func (_m *MockVectorIndex) Delete(id ...uint64) error
Delete provides a mock function with given fields: id
func (*MockVectorIndex) Drop ¶ added in v1.32.1
func (_m *MockVectorIndex) Drop(ctx context.Context, keepFiles bool) error
Drop provides a mock function with given fields: ctx, keepFiles
func (*MockVectorIndex) EXPECT ¶ added in v1.32.1
func (_m *MockVectorIndex) EXPECT() *MockVectorIndex_Expecter
func (*MockVectorIndex) Flush ¶ added in v1.32.1
func (_m *MockVectorIndex) Flush() error
Flush provides a mock function with no fields
func (*MockVectorIndex) Iterate ¶ added in v1.32.1
func (_m *MockVectorIndex) Iterate(fn func(uint64) bool)
Iterate provides a mock function with given fields: fn
func (*MockVectorIndex) ListFiles ¶ added in v1.32.1
ListFiles provides a mock function with given fields: ctx, basePath
func (*MockVectorIndex) Multivector ¶ added in v1.32.1
func (_m *MockVectorIndex) Multivector() bool
Multivector provides a mock function with no fields
func (*MockVectorIndex) PostStartup ¶ added in v1.32.1
func (_m *MockVectorIndex) PostStartup(ctx context.Context)
PostStartup provides a mock function with given fields: ctx
func (*MockVectorIndex) Preload ¶ added in v1.32.12
func (_m *MockVectorIndex) Preload(id uint64, vector []float32)
Preload provides a mock function with given fields: id, vector
func (*MockVectorIndex) QueryVectorDistancer ¶ added in v1.32.1
func (_m *MockVectorIndex) QueryVectorDistancer(queryVector []float32) common.QueryVectorDistancer
QueryVectorDistancer provides a mock function with given fields: queryVector
func (*MockVectorIndex) SearchByVector ¶ added in v1.32.1
func (_m *MockVectorIndex) SearchByVector(ctx context.Context, vector []float32, k int, allow helpers.AllowList) ([]uint64, []float32, error)
SearchByVector provides a mock function with given fields: ctx, vector, k, allow
func (*MockVectorIndex) SearchByVectorDistance ¶ added in v1.32.1
func (_m *MockVectorIndex) SearchByVectorDistance(ctx context.Context, vector []float32, dist float32, maxLimit int64, allow helpers.AllowList) ([]uint64, []float32, error)
SearchByVectorDistance provides a mock function with given fields: ctx, vector, dist, maxLimit, allow
func (*MockVectorIndex) Shutdown ¶ added in v1.32.1
func (_m *MockVectorIndex) Shutdown(ctx context.Context) error
Shutdown provides a mock function with given fields: ctx
func (*MockVectorIndex) SwitchCommitLogs ¶ added in v1.32.1
func (_m *MockVectorIndex) SwitchCommitLogs(ctx context.Context) error
SwitchCommitLogs provides a mock function with given fields: ctx
func (*MockVectorIndex) Type ¶ added in v1.32.1
func (_m *MockVectorIndex) Type() common.IndexType
Type provides a mock function with no fields
func (*MockVectorIndex) UpdateUserConfig ¶ added in v1.32.1
func (_m *MockVectorIndex) UpdateUserConfig(updated config.VectorIndexConfig, callback func()) error
UpdateUserConfig provides a mock function with given fields: updated, callback
func (*MockVectorIndex) ValidateBeforeInsert ¶ added in v1.32.1
func (_m *MockVectorIndex) ValidateBeforeInsert(vector []float32) error
ValidateBeforeInsert provides a mock function with given fields: vector
type MockVectorIndex_AddBatch_Call ¶ added in v1.32.1
MockVectorIndex_AddBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddBatch'
func (*MockVectorIndex_AddBatch_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_AddBatch_Call) Return(_a0 error) *MockVectorIndex_AddBatch_Call
func (*MockVectorIndex_AddBatch_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_AddBatch_Call) Run(run func(ctx context.Context, id []uint64, vector [][]float32)) *MockVectorIndex_AddBatch_Call
func (*MockVectorIndex_AddBatch_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_AddBatch_Call) RunAndReturn(run func(context.Context, []uint64, [][]float32) error) *MockVectorIndex_AddBatch_Call
type MockVectorIndex_Add_Call ¶ added in v1.32.1
MockVectorIndex_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
func (*MockVectorIndex_Add_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_Add_Call) Return(_a0 error) *MockVectorIndex_Add_Call
func (*MockVectorIndex_Add_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_Add_Call) Run(run func(ctx context.Context, id uint64, vector []float32)) *MockVectorIndex_Add_Call
func (*MockVectorIndex_Add_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_Add_Call) RunAndReturn(run func(context.Context, uint64, []float32) error) *MockVectorIndex_Add_Call
type MockVectorIndex_Compressed_Call ¶ added in v1.32.1
MockVectorIndex_Compressed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Compressed'
func (*MockVectorIndex_Compressed_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_Compressed_Call) Return(_a0 bool) *MockVectorIndex_Compressed_Call
func (*MockVectorIndex_Compressed_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_Compressed_Call) Run(run func()) *MockVectorIndex_Compressed_Call
func (*MockVectorIndex_Compressed_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_Compressed_Call) RunAndReturn(run func() bool) *MockVectorIndex_Compressed_Call
type MockVectorIndex_ContainsDoc_Call ¶ added in v1.32.1
MockVectorIndex_ContainsDoc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContainsDoc'
func (*MockVectorIndex_ContainsDoc_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_ContainsDoc_Call) Return(_a0 bool) *MockVectorIndex_ContainsDoc_Call
func (*MockVectorIndex_ContainsDoc_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_ContainsDoc_Call) Run(run func(docID uint64)) *MockVectorIndex_ContainsDoc_Call
func (*MockVectorIndex_ContainsDoc_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_ContainsDoc_Call) RunAndReturn(run func(uint64) bool) *MockVectorIndex_ContainsDoc_Call
type MockVectorIndex_Delete_Call ¶ added in v1.32.1
MockVectorIndex_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*MockVectorIndex_Delete_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_Delete_Call) Return(_a0 error) *MockVectorIndex_Delete_Call
func (*MockVectorIndex_Delete_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_Delete_Call) Run(run func(id ...uint64)) *MockVectorIndex_Delete_Call
func (*MockVectorIndex_Delete_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_Delete_Call) RunAndReturn(run func(...uint64) error) *MockVectorIndex_Delete_Call
type MockVectorIndex_Drop_Call ¶ added in v1.32.1
MockVectorIndex_Drop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Drop'
func (*MockVectorIndex_Drop_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_Drop_Call) Return(_a0 error) *MockVectorIndex_Drop_Call
func (*MockVectorIndex_Drop_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_Drop_Call) Run(run func(ctx context.Context, keepFiles bool)) *MockVectorIndex_Drop_Call
func (*MockVectorIndex_Drop_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_Drop_Call) RunAndReturn(run func(context.Context, bool) error) *MockVectorIndex_Drop_Call
type MockVectorIndex_Expecter ¶ added in v1.32.1
type MockVectorIndex_Expecter struct {
// contains filtered or unexported fields
}
func (*MockVectorIndex_Expecter) Add ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) Add(ctx interface{}, id interface{}, vector interface{}) *MockVectorIndex_Add_Call
Add is a helper method to define mock.On call
- ctx context.Context
- id uint64
- vector []float32
func (*MockVectorIndex_Expecter) AddBatch ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) AddBatch(ctx interface{}, id interface{}, vector interface{}) *MockVectorIndex_AddBatch_Call
AddBatch is a helper method to define mock.On call
- ctx context.Context
- id []uint64
- vector [][]float32
func (*MockVectorIndex_Expecter) Compressed ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) Compressed() *MockVectorIndex_Compressed_Call
Compressed is a helper method to define mock.On call
func (*MockVectorIndex_Expecter) ContainsDoc ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) ContainsDoc(docID interface{}) *MockVectorIndex_ContainsDoc_Call
ContainsDoc is a helper method to define mock.On call
- docID uint64
func (*MockVectorIndex_Expecter) Delete ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) Delete(id ...interface{}) *MockVectorIndex_Delete_Call
Delete is a helper method to define mock.On call
- id ...uint64
func (*MockVectorIndex_Expecter) Drop ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) Drop(ctx interface{}, keepFiles interface{}) *MockVectorIndex_Drop_Call
Drop is a helper method to define mock.On call
- ctx context.Context
- keepFiles bool
func (*MockVectorIndex_Expecter) Flush ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) Flush() *MockVectorIndex_Flush_Call
Flush is a helper method to define mock.On call
func (*MockVectorIndex_Expecter) Iterate ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) Iterate(fn interface{}) *MockVectorIndex_Iterate_Call
Iterate is a helper method to define mock.On call
- fn func(uint64) bool
func (*MockVectorIndex_Expecter) ListFiles ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) ListFiles(ctx interface{}, basePath interface{}) *MockVectorIndex_ListFiles_Call
ListFiles is a helper method to define mock.On call
- ctx context.Context
- basePath string
func (*MockVectorIndex_Expecter) Multivector ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) Multivector() *MockVectorIndex_Multivector_Call
Multivector is a helper method to define mock.On call
func (*MockVectorIndex_Expecter) PostStartup ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) PostStartup(ctx interface{}) *MockVectorIndex_PostStartup_Call
PostStartup is a helper method to define mock.On call
- ctx context.Context
func (*MockVectorIndex_Expecter) Preload ¶ added in v1.32.12
func (_e *MockVectorIndex_Expecter) Preload(id interface{}, vector interface{}) *MockVectorIndex_Preload_Call
Preload is a helper method to define mock.On call
- id uint64
- vector []float32
func (*MockVectorIndex_Expecter) QueryVectorDistancer ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) QueryVectorDistancer(queryVector interface{}) *MockVectorIndex_QueryVectorDistancer_Call
QueryVectorDistancer is a helper method to define mock.On call
- queryVector []float32
func (*MockVectorIndex_Expecter) SearchByVector ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) SearchByVector(ctx interface{}, vector interface{}, k interface{}, allow interface{}) *MockVectorIndex_SearchByVector_Call
SearchByVector is a helper method to define mock.On call
- ctx context.Context
- vector []float32
- k int
- allow helpers.AllowList
func (*MockVectorIndex_Expecter) SearchByVectorDistance ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) SearchByVectorDistance(ctx interface{}, vector interface{}, dist interface{}, maxLimit interface{}, allow interface{}) *MockVectorIndex_SearchByVectorDistance_Call
SearchByVectorDistance is a helper method to define mock.On call
- ctx context.Context
- vector []float32
- dist float32
- maxLimit int64
- allow helpers.AllowList
func (*MockVectorIndex_Expecter) Shutdown ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) Shutdown(ctx interface{}) *MockVectorIndex_Shutdown_Call
Shutdown is a helper method to define mock.On call
- ctx context.Context
func (*MockVectorIndex_Expecter) SwitchCommitLogs ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) SwitchCommitLogs(ctx interface{}) *MockVectorIndex_SwitchCommitLogs_Call
SwitchCommitLogs is a helper method to define mock.On call
- ctx context.Context
func (*MockVectorIndex_Expecter) Type ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) Type() *MockVectorIndex_Type_Call
Type is a helper method to define mock.On call
func (*MockVectorIndex_Expecter) UpdateUserConfig ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) UpdateUserConfig(updated interface{}, callback interface{}) *MockVectorIndex_UpdateUserConfig_Call
UpdateUserConfig is a helper method to define mock.On call
- updated config.VectorIndexConfig
- callback func()
func (*MockVectorIndex_Expecter) ValidateBeforeInsert ¶ added in v1.32.1
func (_e *MockVectorIndex_Expecter) ValidateBeforeInsert(vector interface{}) *MockVectorIndex_ValidateBeforeInsert_Call
ValidateBeforeInsert is a helper method to define mock.On call
- vector []float32
type MockVectorIndex_Flush_Call ¶ added in v1.32.1
MockVectorIndex_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush'
func (*MockVectorIndex_Flush_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_Flush_Call) Return(_a0 error) *MockVectorIndex_Flush_Call
func (*MockVectorIndex_Flush_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_Flush_Call) Run(run func()) *MockVectorIndex_Flush_Call
func (*MockVectorIndex_Flush_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_Flush_Call) RunAndReturn(run func() error) *MockVectorIndex_Flush_Call
type MockVectorIndex_Iterate_Call ¶ added in v1.32.1
MockVectorIndex_Iterate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Iterate'
func (*MockVectorIndex_Iterate_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_Iterate_Call) Return() *MockVectorIndex_Iterate_Call
func (*MockVectorIndex_Iterate_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_Iterate_Call) Run(run func(fn func(uint64) bool)) *MockVectorIndex_Iterate_Call
func (*MockVectorIndex_Iterate_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_Iterate_Call) RunAndReturn(run func(func(uint64) bool)) *MockVectorIndex_Iterate_Call
type MockVectorIndex_ListFiles_Call ¶ added in v1.32.1
MockVectorIndex_ListFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListFiles'
func (*MockVectorIndex_ListFiles_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_ListFiles_Call) Return(_a0 []string, _a1 error) *MockVectorIndex_ListFiles_Call
func (*MockVectorIndex_ListFiles_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_ListFiles_Call) Run(run func(ctx context.Context, basePath string)) *MockVectorIndex_ListFiles_Call
func (*MockVectorIndex_ListFiles_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_ListFiles_Call) RunAndReturn(run func(context.Context, string) ([]string, error)) *MockVectorIndex_ListFiles_Call
type MockVectorIndex_Multivector_Call ¶ added in v1.32.1
MockVectorIndex_Multivector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Multivector'
func (*MockVectorIndex_Multivector_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_Multivector_Call) Return(_a0 bool) *MockVectorIndex_Multivector_Call
func (*MockVectorIndex_Multivector_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_Multivector_Call) Run(run func()) *MockVectorIndex_Multivector_Call
func (*MockVectorIndex_Multivector_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_Multivector_Call) RunAndReturn(run func() bool) *MockVectorIndex_Multivector_Call
type MockVectorIndex_PostStartup_Call ¶ added in v1.32.1
MockVectorIndex_PostStartup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PostStartup'
func (*MockVectorIndex_PostStartup_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_PostStartup_Call) Return() *MockVectorIndex_PostStartup_Call
func (*MockVectorIndex_PostStartup_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_PostStartup_Call) Run(run func(ctx context.Context)) *MockVectorIndex_PostStartup_Call
func (*MockVectorIndex_PostStartup_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_PostStartup_Call) RunAndReturn(run func(context.Context)) *MockVectorIndex_PostStartup_Call
type MockVectorIndex_Preload_Call ¶ added in v1.32.12
MockVectorIndex_Preload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Preload'
func (*MockVectorIndex_Preload_Call) Return ¶ added in v1.32.12
func (_c *MockVectorIndex_Preload_Call) Return() *MockVectorIndex_Preload_Call
func (*MockVectorIndex_Preload_Call) Run ¶ added in v1.32.12
func (_c *MockVectorIndex_Preload_Call) Run(run func(id uint64, vector []float32)) *MockVectorIndex_Preload_Call
func (*MockVectorIndex_Preload_Call) RunAndReturn ¶ added in v1.32.12
func (_c *MockVectorIndex_Preload_Call) RunAndReturn(run func(uint64, []float32)) *MockVectorIndex_Preload_Call
type MockVectorIndex_QueryVectorDistancer_Call ¶ added in v1.32.1
MockVectorIndex_QueryVectorDistancer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryVectorDistancer'
func (*MockVectorIndex_QueryVectorDistancer_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_QueryVectorDistancer_Call) Return(_a0 common.QueryVectorDistancer) *MockVectorIndex_QueryVectorDistancer_Call
func (*MockVectorIndex_QueryVectorDistancer_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_QueryVectorDistancer_Call) Run(run func(queryVector []float32)) *MockVectorIndex_QueryVectorDistancer_Call
func (*MockVectorIndex_QueryVectorDistancer_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_QueryVectorDistancer_Call) RunAndReturn(run func([]float32) common.QueryVectorDistancer) *MockVectorIndex_QueryVectorDistancer_Call
type MockVectorIndex_SearchByVectorDistance_Call ¶ added in v1.32.1
MockVectorIndex_SearchByVectorDistance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchByVectorDistance'
func (*MockVectorIndex_SearchByVectorDistance_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_SearchByVectorDistance_Call) Return(_a0 []uint64, _a1 []float32, _a2 error) *MockVectorIndex_SearchByVectorDistance_Call
func (*MockVectorIndex_SearchByVectorDistance_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_SearchByVectorDistance_Call) Run(run func(ctx context.Context, vector []float32, dist float32, maxLimit int64, allow helpers.AllowList)) *MockVectorIndex_SearchByVectorDistance_Call
func (*MockVectorIndex_SearchByVectorDistance_Call) RunAndReturn ¶ added in v1.32.1
type MockVectorIndex_SearchByVector_Call ¶ added in v1.32.1
MockVectorIndex_SearchByVector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchByVector'
func (*MockVectorIndex_SearchByVector_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_SearchByVector_Call) Return(_a0 []uint64, _a1 []float32, _a2 error) *MockVectorIndex_SearchByVector_Call
func (*MockVectorIndex_SearchByVector_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_SearchByVector_Call) Run(run func(ctx context.Context, vector []float32, k int, allow helpers.AllowList)) *MockVectorIndex_SearchByVector_Call
func (*MockVectorIndex_SearchByVector_Call) RunAndReturn ¶ added in v1.32.1
type MockVectorIndex_Shutdown_Call ¶ added in v1.32.1
MockVectorIndex_Shutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shutdown'
func (*MockVectorIndex_Shutdown_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_Shutdown_Call) Return(_a0 error) *MockVectorIndex_Shutdown_Call
func (*MockVectorIndex_Shutdown_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_Shutdown_Call) Run(run func(ctx context.Context)) *MockVectorIndex_Shutdown_Call
func (*MockVectorIndex_Shutdown_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_Shutdown_Call) RunAndReturn(run func(context.Context) error) *MockVectorIndex_Shutdown_Call
type MockVectorIndex_SwitchCommitLogs_Call ¶ added in v1.32.1
MockVectorIndex_SwitchCommitLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SwitchCommitLogs'
func (*MockVectorIndex_SwitchCommitLogs_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_SwitchCommitLogs_Call) Return(_a0 error) *MockVectorIndex_SwitchCommitLogs_Call
func (*MockVectorIndex_SwitchCommitLogs_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_SwitchCommitLogs_Call) Run(run func(ctx context.Context)) *MockVectorIndex_SwitchCommitLogs_Call
func (*MockVectorIndex_SwitchCommitLogs_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_SwitchCommitLogs_Call) RunAndReturn(run func(context.Context) error) *MockVectorIndex_SwitchCommitLogs_Call
type MockVectorIndex_Type_Call ¶ added in v1.32.1
MockVectorIndex_Type_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Type'
func (*MockVectorIndex_Type_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_Type_Call) Return(_a0 common.IndexType) *MockVectorIndex_Type_Call
func (*MockVectorIndex_Type_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_Type_Call) Run(run func()) *MockVectorIndex_Type_Call
func (*MockVectorIndex_Type_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_Type_Call) RunAndReturn(run func() common.IndexType) *MockVectorIndex_Type_Call
type MockVectorIndex_UpdateUserConfig_Call ¶ added in v1.32.1
MockVectorIndex_UpdateUserConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUserConfig'
func (*MockVectorIndex_UpdateUserConfig_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_UpdateUserConfig_Call) Return(_a0 error) *MockVectorIndex_UpdateUserConfig_Call
func (*MockVectorIndex_UpdateUserConfig_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_UpdateUserConfig_Call) Run(run func(updated config.VectorIndexConfig, callback func())) *MockVectorIndex_UpdateUserConfig_Call
func (*MockVectorIndex_UpdateUserConfig_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_UpdateUserConfig_Call) RunAndReturn(run func(config.VectorIndexConfig, func()) error) *MockVectorIndex_UpdateUserConfig_Call
type MockVectorIndex_ValidateBeforeInsert_Call ¶ added in v1.32.1
MockVectorIndex_ValidateBeforeInsert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateBeforeInsert'
func (*MockVectorIndex_ValidateBeforeInsert_Call) Return ¶ added in v1.32.1
func (_c *MockVectorIndex_ValidateBeforeInsert_Call) Return(_a0 error) *MockVectorIndex_ValidateBeforeInsert_Call
func (*MockVectorIndex_ValidateBeforeInsert_Call) Run ¶ added in v1.32.1
func (_c *MockVectorIndex_ValidateBeforeInsert_Call) Run(run func(vector []float32)) *MockVectorIndex_ValidateBeforeInsert_Call
func (*MockVectorIndex_ValidateBeforeInsert_Call) RunAndReturn ¶ added in v1.32.1
func (_c *MockVectorIndex_ValidateBeforeInsert_Call) RunAndReturn(run func([]float32) error) *MockVectorIndex_ValidateBeforeInsert_Call
type VectorIndex ¶
type VectorIndex interface {
Add(ctx context.Context, id uint64, vector []float32) error
AddBatch(ctx context.Context, id []uint64, vector [][]float32) error
Delete(id ...uint64) error
SearchByVector(ctx context.Context, vector []float32, k int, allow helpers.AllowList) ([]uint64, []float32, error)
SearchByVectorDistance(ctx context.Context, vector []float32, dist float32,
maxLimit int64, allow helpers.AllowList) ([]uint64, []float32, error)
UpdateUserConfig(updated schemaconfig.VectorIndexConfig, callback func()) error
Drop(ctx context.Context, keepFiles bool) error
Shutdown(ctx context.Context) error
Flush() error
SwitchCommitLogs(ctx context.Context) error
ListFiles(ctx context.Context, basePath string) ([]string, error)
PostStartup(ctx context.Context)
Compressed() bool
Multivector() bool
ValidateBeforeInsert(vector []float32) error
ContainsDoc(docID uint64) bool
Preload(id uint64, vector []float32)
QueryVectorDistancer(queryVector []float32) common.QueryVectorDistancer
// Iterate over all indexed document ids in the index.
// Consistency or order is not guaranteed, as the index may be concurrently modified.
// If the callback returns false, the iteration will stop.
Iterate(fn func(docID uint64) bool)
Type() common.IndexType
}