Documentation ¶
Index ¶
- Constants
- type HnswVectorIndex
- func (ims *HnswVectorIndex) DeleteVector(ctx context.Context, textId int64, key string) error
- func (ims *HnswVectorIndex) GetCheckpointId(ctx context.Context) (int64, error)
- func (ims *HnswVectorIndex) GetEmbedderName() string
- func (ims *HnswVectorIndex) GetLastIndexedTextId(ctx context.Context) (int64, error)
- func (ims *HnswVectorIndex) GetSearchMethodName() string
- func (ims *HnswVectorIndex) GetVector(ctx context.Context, key string) ([]float32, error)
- func (ims *HnswVectorIndex) GetVectorNodesMap() map[string][]float32
- func (ims *HnswVectorIndex) InsertVector(ctx context.Context, textId int64, vec []float32) error
- func (ims *HnswVectorIndex) InsertVectorToMemory(ctx context.Context, textId, vectorId int64, key string, vec []float32) error
- func (ims *HnswVectorIndex) InsertVectors(ctx context.Context, textIds []int64, vecs [][]float32) error
- func (ims *HnswVectorIndex) InsertVectorsToMemory(ctx context.Context, textIds []int64, vectorIds []int64, keys []string, ...) error
- func (ims *HnswVectorIndex) Search(ctx context.Context, query []float32, maxResults int, ...) (utils.MaxTupleHeap, error)
- func (ims *HnswVectorIndex) SearchWithKey(ctx context.Context, queryKey string, maxResults int, ...) (utils.MaxTupleHeap, error)
- func (ims *HnswVectorIndex) SetEmbedderName(embedderName string) error
Constants ¶
View Source
const (
HnswVectorIndexType = "HnswVectorIndex"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HnswVectorIndex ¶
type HnswVectorIndex struct { HnswIndex *hnsw.Graph[string] // contains filtered or unexported fields }
func NewHnswVectorIndex ¶
func NewHnswVectorIndex(searchMethod, embedder string) *HnswVectorIndex
func (*HnswVectorIndex) DeleteVector ¶
func (*HnswVectorIndex) GetCheckpointId ¶
func (ims *HnswVectorIndex) GetCheckpointId(ctx context.Context) (int64, error)
func (*HnswVectorIndex) GetEmbedderName ¶
func (ims *HnswVectorIndex) GetEmbedderName() string
func (*HnswVectorIndex) GetLastIndexedTextId ¶
func (ims *HnswVectorIndex) GetLastIndexedTextId(ctx context.Context) (int64, error)
func (*HnswVectorIndex) GetSearchMethodName ¶
func (ims *HnswVectorIndex) GetSearchMethodName() string
func (*HnswVectorIndex) GetVectorNodesMap ¶
func (ims *HnswVectorIndex) GetVectorNodesMap() map[string][]float32
func (*HnswVectorIndex) InsertVector ¶
func (*HnswVectorIndex) InsertVectorToMemory ¶
func (*HnswVectorIndex) InsertVectors ¶
func (*HnswVectorIndex) InsertVectorsToMemory ¶
func (*HnswVectorIndex) Search ¶
func (ims *HnswVectorIndex) Search(ctx context.Context, query []float32, maxResults int, filter index.SearchFilter) (utils.MaxTupleHeap, error)
func (*HnswVectorIndex) SearchWithKey ¶
func (ims *HnswVectorIndex) SearchWithKey(ctx context.Context, queryKey string, maxResults int, filter index.SearchFilter) (utils.MaxTupleHeap, error)
func (*HnswVectorIndex) SetEmbedderName ¶
func (ims *HnswVectorIndex) SetEmbedderName(embedderName string) error
Click to show internal directories.
Click to hide internal directories.