pgvector

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package pgvector provides a PostgreSQL+pgvector-backed VectorStore adapter for Chronos.

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 implements storage.VectorStore using PostgreSQL with the pgvector extension.

func New

func New(db *sql.DB) *Store

New creates a PgVector store from an existing database connection. The database must have the pgvector extension enabled: CREATE EXTENSION IF NOT EXISTS vector;

func (*Store) Close

func (s *Store) Close() error

func (*Store) CreateCollection

func (s *Store) CreateCollection(ctx context.Context, name string, dimension int) error

func (*Store) Delete

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

func (*Store) Search

func (s *Store) Search(ctx context.Context, collection string, query []float32, topK int, opts ...storage.SearchOption) ([]storage.SearchResult, error)

func (*Store) Upsert

func (s *Store) Upsert(ctx context.Context, collection string, embeddings []storage.Embedding) error

Jump to

Keyboard shortcuts

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