sqlitevec

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package sqlitevec is the bundled vector.Store backend: SQLite + sqlite-vec, in a dedicated database file (never the config-reloaded runtime DB).

v1 is exact, not approximate. Each collection is a normal table holding a serialized float32 BLOB per item plus a JSON metadata sidecar; search brute-force-ranks with sqlite-vec's vec_distance_cosine() scalar function and pushes the metadata filter into a parameterized WHERE before ranking. No vec0 virtual table, no ANN, no recall tuning — fine into the ~100k-vector range, and swappable for vec0/ANN or pgvector behind the vector.Store interface when HA or scale demands it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is the sqlite-vec-backed vector.Store.

func New

func New(dbPath string) (*Store, error)

New opens (creating if absent) the vector database at dbPath and verifies sqlite-vec is loaded. The DSN mirrors the chassis runtime convention (WAL + busy_timeout, no cache=shared).

func (*Store) Close

func (s *Store) Close() error

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, tenant, collection string, ids []string) (int, error)

func (*Store) DescribeCollection

func (s *Store) DescribeCollection(ctx context.Context, tenant, name string) (vector.Collection, bool, error)

func (*Store) EnsureCollection

func (s *Store) EnsureCollection(ctx context.Context, tenant string, c vector.Collection) error

func (*Store) Search

func (s *Store) Search(ctx context.Context, tenant, collection string, query []float32, limit int, filter vector.Filter) ([]vector.Match, error)

func (*Store) Upsert

func (s *Store) Upsert(ctx context.Context, tenant, collection string, items []vector.Item) (int, error)

Jump to

Keyboard shortcuts

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