Documentation
¶
Overview ¶
Package pgvector implements the vectorstore.Store interface for PostgreSQL with pgvector.
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) Count(ctx context.Context, collection string) (int64, error)
- func (c *Client) DeleteCollection(ctx context.Context, name string) error
- func (c *Client) EnsureCollection(ctx context.Context, name string, dim int) error
- func (c *Client) Search(ctx context.Context, collection string, vector []float32, topK int) ([]vectorstore.Result, error)
- func (c *Client) Upsert(ctx context.Context, collection string, points []vectorstore.Point) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements vectorstore.Store for PostgreSQL with pgvector extension.
func New ¶
New creates a new pgvector client. connStr should be a PostgreSQL connection string, e.g.: "postgres://user:password@localhost:5432/dbname"
func (*Client) DeleteCollection ¶
DeleteCollection removes a collection table and all its data.
func (*Client) EnsureCollection ¶
EnsureCollection creates a table for the collection if it doesn't exist.
Click to show internal directories.
Click to hide internal directories.