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 ¶
- type Store
- func (s *Store) Close() error
- func (s *Store) Delete(ctx context.Context, tenant, collection string, ids []string) (int, error)
- func (s *Store) DescribeCollection(ctx context.Context, tenant, name string) (vector.Collection, bool, error)
- func (s *Store) DropCollection(ctx context.Context, tenant, name string) (int, error)
- func (s *Store) EnsureCollection(ctx context.Context, tenant string, c vector.Collection) error
- func (s *Store) ListCollections(ctx context.Context, tenant string) ([]vector.Collection, error)
- func (s *Store) ListIDs(ctx context.Context, tenant, collection string) ([]string, error)
- func (s *Store) Search(ctx context.Context, tenant, collection string, query []float32, limit int, ...) ([]vector.Match, error)
- func (s *Store) Upsert(ctx context.Context, tenant, collection string, items []vector.Item) (int, error)
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 ¶
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).