sequential

package
v0.13.0-test.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SequentialVectorIndexType = "SequentialVectorIndex"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SequentialVectorIndex

type SequentialVectorIndex struct {
	VectorMap map[string][]float32 // key: vector
	// contains filtered or unexported fields
}

func NewSequentialVectorIndex

func NewSequentialVectorIndex(searchMethod, embedder string) *SequentialVectorIndex

func (*SequentialVectorIndex) DeleteVector

func (ims *SequentialVectorIndex) DeleteVector(ctx context.Context, textId int64, key string) error

func (*SequentialVectorIndex) GetCheckpointId

func (ims *SequentialVectorIndex) GetCheckpointId(ctx context.Context) (int64, error)

func (*SequentialVectorIndex) GetEmbedderName

func (ims *SequentialVectorIndex) GetEmbedderName() string

func (*SequentialVectorIndex) GetLastIndexedTextId

func (ims *SequentialVectorIndex) GetLastIndexedTextId(ctx context.Context) (int64, error)

func (*SequentialVectorIndex) GetSearchMethodName

func (ims *SequentialVectorIndex) GetSearchMethodName() string

func (*SequentialVectorIndex) GetVector

func (ims *SequentialVectorIndex) GetVector(ctx context.Context, key string) ([]float32, error)

func (*SequentialVectorIndex) GetVectorNodesMap

func (ims *SequentialVectorIndex) GetVectorNodesMap() map[string][]float32

func (*SequentialVectorIndex) InsertVector

func (ims *SequentialVectorIndex) InsertVector(ctx context.Context, textId int64, vec []float32) error

func (*SequentialVectorIndex) InsertVectorToMemory

func (ims *SequentialVectorIndex) InsertVectorToMemory(ctx context.Context, textId, vectorId int64, key string, vec []float32) error

func (*SequentialVectorIndex) InsertVectors

func (ims *SequentialVectorIndex) InsertVectors(ctx context.Context, textIds []int64, vecs [][]float32) error

func (*SequentialVectorIndex) InsertVectorsToMemory

func (ims *SequentialVectorIndex) InsertVectorsToMemory(ctx context.Context, textIds []int64, vectorIds []int64, keys []string, vecs [][]float32) error

func (*SequentialVectorIndex) Search

func (ims *SequentialVectorIndex) Search(ctx context.Context, query []float32, maxResults int, filter index.SearchFilter) (utils.MaxTupleHeap, error)

func (*SequentialVectorIndex) SearchWithKey

func (ims *SequentialVectorIndex) SearchWithKey(ctx context.Context, queryKey string, maxResults int, filter index.SearchFilter) (utils.MaxTupleHeap, error)

func (*SequentialVectorIndex) SetEmbedderName

func (ims *SequentialVectorIndex) SetEmbedderName(embedderName string) error

Jump to

Keyboard shortcuts

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