qdrant

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 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

View Source
const (
	// DefaultHost is the default Qdrant host.
	DefaultHost = "localhost"
	// DefaultPort is the default Qdrant gRPC port.
	DefaultPort = 6334
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host string
	Port int
	// APIKey is optional (e.g. for Qdrant Cloud).
	APIKey string
}

Config configures the Qdrant connection.

type Store

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

Store implements knowledge.VectorStore using Qdrant. Collection name is passed per call; each knowledge base uses its own collection.

func NewStore

func NewStore(cfg Config) (*Store, error)

NewStore creates a new Qdrant-backed vector store.

func (*Store) Close

func (s *Store) Close() error

Close closes the Qdrant client.

func (*Store) DeleteCollection

func (s *Store) DeleteCollection(ctx context.Context, collectionName string) error

DeleteCollection removes the entire collection.

func (*Store) DeleteVectors

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

DeleteVectors removes specific vectors by ID.

func (*Store) EnsureCollection

func (s *Store) EnsureCollection(ctx context.Context, collectionName string, dimension int) error

EnsureCollection creates the collection if it does not exist.

func (*Store) Search

func (s *Store) Search(ctx context.Context, collectionName string, queryVector []float64, limit int, filter map[string]any) ([]vectorstores.SearchResult, error)

Search performs a vector similarity search.

func (*Store) UpsertVectors

func (s *Store) UpsertVectors(ctx context.Context, collectionName string, ids []string, embeddings [][]float64, metadata []map[string]any) error

UpsertVectors inserts or updates vectors with metadata.

Jump to

Keyboard shortcuts

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