postgres

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PGVector

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

func NewPGVector

func NewPGVector(db *sqlx.DB, config PGVectorConfig) (*PGVector, error)

func (*PGVector) Clear

func (pv *PGVector) Clear(ctx context.Context) error

func (*PGVector) Delete

func (pv *PGVector) Delete(ctx context.Context, postIDs []string) error

func (*PGVector) DeleteOrphaned added in v1.14.0

func (pv *PGVector) DeleteOrphaned(ctx context.Context, nowTime, batchSize int64) (int64, error)

DeleteOrphaned removes embeddings whose posts no longer exist or are soft-deleted past retention.

func (*PGVector) Search

func (pv *PGVector) Search(ctx context.Context, embedding []float32, opts embeddings.SearchOptions) ([]embeddings.SearchResult, error)

func (*PGVector) Store

func (pv *PGVector) Store(ctx context.Context, docs []embeddings.PostDocument, embeddings [][]float32) error

type PGVectorConfig

type PGVectorConfig struct {
	Dimensions int `json:"dimensions"`
}

Jump to

Keyboard shortcuts

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