dynamic

package
v1.35.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: BSD-3-Clause Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config, uc ent.UserConfig, store *lsmkv.Store) (*dynamic, error)

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
	SharedDB                     *bolt.DB
	HNSWDisableSnapshots         bool
	HNSWSnapshotOnStartup        bool
	HNSWWaitForCachePrefill      bool
	AllocChecker                 memwatch.AllocChecker
	MakeBucketOptions            lsmkv.MakeBucketOptions
	AsyncIndexingEnabled         bool
}

func (Config) Validate

func (c Config) Validate() error

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 Index added in v1.32.1

type Index interface {
	// UnderlyingIndex returns the underlying index type (flat or hnsw)
	UnderlyingIndex() common.IndexType
	IsUpgraded() bool
}

type MockIndex added in v1.32.1

type MockIndex struct {
	mock.Mock
}

MockIndex is an autogenerated mock type for the Index type

func NewMockIndex added in v1.32.1

func NewMockIndex(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockIndex

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

func (_m *MockIndex) IsUpgraded() bool

IsUpgraded provides a mock function with no fields

func (*MockIndex) UnderlyingIndex added in v1.32.1

func (_m *MockIndex) UnderlyingIndex() common.IndexType

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

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

type MockIndex_IsUpgraded_Call struct {
	*mock.Call
}

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 (*MockIndex_IsUpgraded_Call) Run added in v1.32.11

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

type MockIndex_UnderlyingIndex_Call struct {
	*mock.Call
}

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 (*MockIndex_UnderlyingIndex_Call) Run added in v1.32.1

func (*MockIndex_UnderlyingIndex_Call) RunAndReturn added in v1.32.1

type MockVectorIndex added in v1.32.1

type MockVectorIndex struct {
	mock.Mock
}

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

func (_m *MockVectorIndex) Add(ctx context.Context, id uint64, vector []float32) error

Add provides a mock function with given fields: ctx, id, vector

func (*MockVectorIndex) AddBatch added in v1.32.1

func (_m *MockVectorIndex) AddBatch(ctx context.Context, id []uint64, vector [][]float32) error

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 (*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

func (_m *MockVectorIndex) ListFiles(ctx context.Context, basePath string) ([]string, error)

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

type MockVectorIndex_AddBatch_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_AddBatch_Call) Run added in v1.32.1

func (*MockVectorIndex_AddBatch_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_Add_Call added in v1.32.1

type MockVectorIndex_Add_Call struct {
	*mock.Call
}

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 (*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

type MockVectorIndex_Compressed_Call added in v1.32.1

type MockVectorIndex_Compressed_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_Compressed_Call) Run added in v1.32.1

func (*MockVectorIndex_Compressed_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_ContainsDoc_Call added in v1.32.1

type MockVectorIndex_ContainsDoc_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_ContainsDoc_Call) Run added in v1.32.1

func (*MockVectorIndex_ContainsDoc_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_Delete_Call added in v1.32.1

type MockVectorIndex_Delete_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_Delete_Call) Run added in v1.32.1

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

type MockVectorIndex_Drop_Call struct {
	*mock.Call
}

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 (*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

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

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

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

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

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

type MockVectorIndex_Flush_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_Flush_Call) Run added in v1.32.1

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

type MockVectorIndex_Iterate_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_Iterate_Call) Run added in v1.32.1

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

type MockVectorIndex_ListFiles_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_ListFiles_Call) Run added in v1.32.1

func (*MockVectorIndex_ListFiles_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_Multivector_Call added in v1.32.1

type MockVectorIndex_Multivector_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_Multivector_Call) Run added in v1.32.1

func (*MockVectorIndex_Multivector_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_PostStartup_Call added in v1.32.1

type MockVectorIndex_PostStartup_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_PostStartup_Call) Run added in v1.32.1

func (*MockVectorIndex_PostStartup_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_Preload_Call added in v1.32.12

type MockVectorIndex_Preload_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_Preload_Call) Run added in v1.32.12

func (*MockVectorIndex_Preload_Call) RunAndReturn added in v1.32.12

type MockVectorIndex_QueryVectorDistancer_Call added in v1.32.1

type MockVectorIndex_QueryVectorDistancer_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_QueryVectorDistancer_Call) Run added in v1.32.1

func (*MockVectorIndex_QueryVectorDistancer_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_SearchByVectorDistance_Call added in v1.32.1

type MockVectorIndex_SearchByVectorDistance_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_SearchByVectorDistance_Call) Run added in v1.32.1

func (*MockVectorIndex_SearchByVectorDistance_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_SearchByVector_Call added in v1.32.1

type MockVectorIndex_SearchByVector_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_SearchByVector_Call) Run added in v1.32.1

func (*MockVectorIndex_SearchByVector_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_Shutdown_Call added in v1.32.1

type MockVectorIndex_Shutdown_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_Shutdown_Call) Run added in v1.32.1

func (*MockVectorIndex_Shutdown_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_SwitchCommitLogs_Call added in v1.32.1

type MockVectorIndex_SwitchCommitLogs_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_SwitchCommitLogs_Call) Run added in v1.32.1

func (*MockVectorIndex_SwitchCommitLogs_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_Type_Call added in v1.32.1

type MockVectorIndex_Type_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_Type_Call) Run added in v1.32.1

func (*MockVectorIndex_Type_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_UpdateUserConfig_Call added in v1.32.1

type MockVectorIndex_UpdateUserConfig_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_UpdateUserConfig_Call) Run added in v1.32.1

func (*MockVectorIndex_UpdateUserConfig_Call) RunAndReturn added in v1.32.1

type MockVectorIndex_ValidateBeforeInsert_Call added in v1.32.1

type MockVectorIndex_ValidateBeforeInsert_Call struct {
	*mock.Call
}

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 (*MockVectorIndex_ValidateBeforeInsert_Call) Run added in v1.32.1

func (*MockVectorIndex_ValidateBeforeInsert_Call) RunAndReturn added in v1.32.1

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL