Documentation
¶
Index ¶
- Constants
- func CalculateOptimalSegments(dims int) int
- func VectorsEqual(vecA, vecB []float32) bool
- type IndexStats
- type IndexType
- type MultiVectorForID
- type PqMaxPool
- type SearchByDistParams
- func (params *SearchByDistParams) Iterate()
- func (params *SearchByDistParams) MaxLimitReached() bool
- func (params *SearchByDistParams) MaximumSearchLimit() int64
- func (params *SearchByDistParams) OffsetCapacity(ids []uint64) int
- func (params *SearchByDistParams) TotalLimit() int
- func (params *SearchByDistParams) TotalLimitCapacity(ids []uint64) int
- type ShardedLocks
- type ShardedRWLocks
- func (sl *ShardedRWLocks) Lock(id uint64)
- func (sl *ShardedRWLocks) LockAll()
- func (sl *ShardedRWLocks) Locked(id uint64, callback func())
- func (sl *ShardedRWLocks) LockedAll(callback func())
- func (sl *ShardedRWLocks) RLock(id uint64)
- func (sl *ShardedRWLocks) RLockAll()
- func (sl *ShardedRWLocks) RLocked(id uint64, callback func())
- func (sl *ShardedRWLocks) RLockedAll(callback func())
- func (sl *ShardedRWLocks) RUnlock(id uint64)
- func (sl *ShardedRWLocks) RUnlockAll()
- func (sl *ShardedRWLocks) Unlock(id uint64)
- func (sl *ShardedRWLocks) UnlockAll()
- type SharedGauge
- type TargetTempVectorForID
- type TargetVectorForID
- type TempVectorForID
- type TempVectorsPool
- type VectorForID
- type VectorSlice
Constants ¶
View Source
const ( IndexTypeHNSW = "hnsw" IndexTypeFlat = "flat" IndexTypeNoop = "noop" IndexTypeDynamic = "dynamic" )
View Source
const ( // DefaultSearchByDistInitialLimit : // the initial limit of 100 here is an // arbitrary decision, and can be tuned // as needed DefaultSearchByDistInitialLimit = 100 // DefaultSearchByDistLimitMultiplier : // the decision to increase the limit in // multiples of 10 here is an arbitrary // decision, and can be tuned as needed DefaultSearchByDistLimitMultiplier = 10 )
View Source
const DefaultShardedLocksCount = 512
Variables ¶
This section is empty.
Functions ¶
func CalculateOptimalSegments ¶ added in v1.25.23
func VectorsEqual ¶ added in v1.24.0
Types ¶
type IndexStats ¶ added in v1.24.23
type IndexStats interface {
IndexType() IndexType
}
type MultiVectorForID ¶
type PqMaxPool ¶
type PqMaxPool struct {
// contains filtered or unexported fields
}
func NewPqMaxPool ¶
type SearchByDistParams ¶
type SearchByDistParams struct {
// contains filtered or unexported fields
}
func NewSearchByDistParams ¶
func NewSearchByDistParams( offset int, limit int, totalLimit int, maximumSearchLimit int64, ) *SearchByDistParams
func (*SearchByDistParams) Iterate ¶
func (params *SearchByDistParams) Iterate()
func (*SearchByDistParams) MaxLimitReached ¶
func (params *SearchByDistParams) MaxLimitReached() bool
func (*SearchByDistParams) MaximumSearchLimit ¶
func (params *SearchByDistParams) MaximumSearchLimit() int64
func (*SearchByDistParams) OffsetCapacity ¶
func (params *SearchByDistParams) OffsetCapacity(ids []uint64) int
func (*SearchByDistParams) TotalLimit ¶
func (params *SearchByDistParams) TotalLimit() int
func (*SearchByDistParams) TotalLimitCapacity ¶
func (params *SearchByDistParams) TotalLimitCapacity(ids []uint64) int
type ShardedLocks ¶
type ShardedLocks struct {
// contains filtered or unexported fields
}
func NewDefaultShardedLocks ¶
func NewDefaultShardedLocks() *ShardedLocks
func NewShardedLocks ¶
func NewShardedLocks(count uint64) *ShardedLocks
func (*ShardedLocks) Lock ¶
func (sl *ShardedLocks) Lock(id uint64)
func (*ShardedLocks) LockAll ¶
func (sl *ShardedLocks) LockAll()
func (*ShardedLocks) Locked ¶
func (sl *ShardedLocks) Locked(id uint64, callback func())
func (*ShardedLocks) LockedAll ¶
func (sl *ShardedLocks) LockedAll(callback func())
func (*ShardedLocks) Unlock ¶
func (sl *ShardedLocks) Unlock(id uint64)
func (*ShardedLocks) UnlockAll ¶
func (sl *ShardedLocks) UnlockAll()
type ShardedRWLocks ¶ added in v1.24.0
type ShardedRWLocks struct {
// contains filtered or unexported fields
}
func NewDefaultShardedRWLocks ¶ added in v1.24.0
func NewDefaultShardedRWLocks() *ShardedRWLocks
func NewShardedRWLocks ¶ added in v1.24.0
func NewShardedRWLocks(count uint64) *ShardedRWLocks
func (*ShardedRWLocks) Lock ¶ added in v1.24.0
func (sl *ShardedRWLocks) Lock(id uint64)
func (*ShardedRWLocks) LockAll ¶ added in v1.24.0
func (sl *ShardedRWLocks) LockAll()
func (*ShardedRWLocks) Locked ¶ added in v1.24.0
func (sl *ShardedRWLocks) Locked(id uint64, callback func())
func (*ShardedRWLocks) LockedAll ¶ added in v1.24.0
func (sl *ShardedRWLocks) LockedAll(callback func())
func (*ShardedRWLocks) RLock ¶ added in v1.24.0
func (sl *ShardedRWLocks) RLock(id uint64)
func (*ShardedRWLocks) RLockAll ¶ added in v1.24.0
func (sl *ShardedRWLocks) RLockAll()
func (*ShardedRWLocks) RLocked ¶ added in v1.24.0
func (sl *ShardedRWLocks) RLocked(id uint64, callback func())
func (*ShardedRWLocks) RLockedAll ¶ added in v1.24.0
func (sl *ShardedRWLocks) RLockedAll(callback func())
func (*ShardedRWLocks) RUnlock ¶ added in v1.24.0
func (sl *ShardedRWLocks) RUnlock(id uint64)
func (*ShardedRWLocks) RUnlockAll ¶ added in v1.24.0
func (sl *ShardedRWLocks) RUnlockAll()
func (*ShardedRWLocks) Unlock ¶ added in v1.24.0
func (sl *ShardedRWLocks) Unlock(id uint64)
func (*ShardedRWLocks) UnlockAll ¶ added in v1.24.0
func (sl *ShardedRWLocks) UnlockAll()
type SharedGauge ¶ added in v1.24.22
type SharedGauge struct {
// contains filtered or unexported fields
}
SharedGauge is a thread-safe gauge that can be shared between multiple goroutines. It is used to track the number of running tasks, and allows to wait until all tasks are done.
func NewSharedGauge ¶ added in v1.24.22
func NewSharedGauge() *SharedGauge
func (*SharedGauge) Count ¶ added in v1.24.22
func (sc *SharedGauge) Count() int64
func (*SharedGauge) Decr ¶ added in v1.24.22
func (sc *SharedGauge) Decr()
func (*SharedGauge) Incr ¶ added in v1.24.22
func (sc *SharedGauge) Incr()
func (*SharedGauge) Wait ¶ added in v1.24.22
func (sc *SharedGauge) Wait()
type TargetTempVectorForID ¶ added in v1.24.11
type TargetTempVectorForID struct { TargetVector string TempVectorForIDThunk func(ctx context.Context, id uint64, container *VectorSlice, targetVector string) ([]float32, error) }
func (TargetTempVectorForID) TempVectorForID ¶ added in v1.24.11
func (t TargetTempVectorForID) TempVectorForID(ctx context.Context, id uint64, container *VectorSlice) ([]float32, error)
type TargetVectorForID ¶ added in v1.24.11
type TargetVectorForID[T float32 | byte | uint64] struct { TargetVector string VectorForIDThunk func(ctx context.Context, id uint64, targetVector string) ([]T, error) }
func (TargetVectorForID[T]) VectorForID ¶ added in v1.24.11
func (t TargetVectorForID[T]) VectorForID(ctx context.Context, id uint64) ([]T, error)
type TempVectorForID ¶
type TempVectorsPool ¶
type TempVectorsPool struct {
// contains filtered or unexported fields
}
func NewTempVectorsPool ¶
func NewTempVectorsPool() *TempVectorsPool
func (*TempVectorsPool) Get ¶
func (pool *TempVectorsPool) Get(capacity int) *VectorSlice
func (*TempVectorsPool) Put ¶
func (pool *TempVectorsPool) Put(container *VectorSlice)
type VectorForID ¶
Click to show internal directories.
Click to hide internal directories.