vectordb

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend string
const (
	BackendSQLite   Backend = "sqlite-vec"
	BackendQdrant   Backend = "qdrant"
	BackendPinecone Backend = "pinecone"
)

type SearchResult

type SearchResult struct {
	Record VectorRecord
	Score  float64
}

type Store

type Store interface {
	Upsert(ctx context.Context, records ...VectorRecord) error
	Search(ctx context.Context, vector []float32, k int) ([]SearchResult, error)
	Delete(ctx context.Context, ids ...string) error
	Close() error
}

func NewStore

func NewStore(cfg *migrate.VectorStoreConfig, logger *slog.Logger) (Store, error)

type VectorRecord

type VectorRecord struct {
	ID       string
	Vector   []float32
	Metadata map[string]string
}

Jump to

Keyboard shortcuts

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