Help us shape the future of Go! Take the 2026 Go Developer Survey

qdrant

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

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 the VectorStore interface for Qdrant

func NewStore

func NewStore() *Store

NewStore creates a new Qdrant vector store instance

func NewStoreWithConfig

func NewStoreWithConfig(config types.VectorStoreConfig) *Store

NewStoreWithConfig creates a new Qdrant vector store instance with a configuration

func (*Store) AddDocuments

func (s *Store) AddDocuments(ctx context.Context, opts *types.AddDocumentOptions) ([]string, error)

AddDocuments adds documents to the collection

func (*Store) Backup

func (s *Store) Backup(ctx context.Context, writer io.Writer, opts *types.BackupOptions) error

Backup creates a backup of the collection using Qdrant's native snapshot functionality

func (*Store) Close

func (s *Store) Close() error

Close closes the connection and cleans up resources

func (*Store) CollectionExists

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

CollectionExists checks if a collection exists

func (*Store) Connect

func (s *Store) Connect(ctx context.Context, storeConfig ...types.VectorStoreConfig) error

Connect establishes connection to Qdrant server

func (*Store) Count

func (s *Store) Count(ctx context.Context, collectionName string, filter map[string]interface{}) (int64, error)

Count returns the number of documents in a collection that match the given filter

func (*Store) CreateCollection

func (s *Store) CreateCollection(ctx context.Context, opts *types.CreateCollectionOptions) error

CreateCollection creates a new collection in Qdrant

func (*Store) DeleteDocuments

func (s *Store) DeleteDocuments(ctx context.Context, opts *types.DeleteDocumentOptions) error

DeleteDocuments deletes documents from the collection

func (*Store) DescribeCollection

func (s *Store) DescribeCollection(ctx context.Context, collectionName string) (*types.VectorStoreStats, error)

DescribeCollection returns statistics about a collection

func (*Store) Disconnect

func (s *Store) Disconnect(ctx context.Context) error

Disconnect closes the connection to Qdrant server

func (*Store) DropCollection

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

DropCollection deletes a collection

func (*Store) GetClient

func (s *Store) GetClient() *qdrant.Client

GetClient returns the underlying Qdrant client

func (*Store) GetConfig

func (s *Store) GetConfig() types.VectorStoreConfig

GetConfig returns the current configuration

func (*Store) GetDocuments

func (s *Store) GetDocuments(ctx context.Context, ids []string, opts *types.GetDocumentOptions) ([]*types.Document, error)

GetDocuments retrieves documents by IDs

func (*Store) GetLoadState

func (s *Store) GetLoadState(ctx context.Context, collectionName string) (types.LoadState, error)

GetLoadState returns the load state of a collection For Qdrant, collections are always loaded if they exist

func (*Store) GetMetadata

func (s *Store) GetMetadata(ctx context.Context, collectionName string, documentID string) (map[string]interface{}, error)

GetMetadata retrieves metadata for a specific document using Qdrant's Retrieve API

func (*Store) GetSearchEngineStats

func (s *Store) GetSearchEngineStats(ctx context.Context, collectionName string) (*types.SearchEngineStats, error)

GetSearchEngineStats returns search engine performance statistics

func (*Store) GetStats

func (s *Store) GetStats(ctx context.Context, collectionName string) (*types.VectorStoreStats, error)

GetStats returns statistics about the collection

func (*Store) IsConnected

func (s *Store) IsConnected() bool

IsConnected returns whether the store is connected

func (*Store) ListCollections

func (s *Store) ListCollections(ctx context.Context) ([]string, error)

ListCollections returns a list of all collections

func (*Store) ListDocuments

ListDocuments lists documents with pagination (Deprecated)

func (*Store) LoadCollection

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

LoadCollection loads a collection (for databases that support it) For Qdrant, this is a no-op as collections are always loaded

func (*Store) Optimize

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

Optimize optimizes the collection

func (*Store) ReleaseCollection

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

ReleaseCollection releases a collection (for databases that support it) For Qdrant, this is a no-op as collections cannot be unloaded

func (*Store) Restore

func (s *Store) Restore(ctx context.Context, reader io.Reader, opts *types.RestoreOptions) error

Restore restores a collection from backup using Qdrant's native snapshot functionality

func (*Store) ScrollDocuments

func (s *Store) ScrollDocuments(ctx context.Context, opts *types.ScrollOptions) (*types.ScrollResult, error)

ScrollDocuments provides iterator-style access to documents

func (*Store) SearchBatch

func (s *Store) SearchBatch(ctx context.Context, opts []types.SearchOptionsInterface) ([]*types.SearchResult, error)

SearchBatch performs unified batch search for multiple search types

func (*Store) SearchHybrid

func (s *Store) SearchHybrid(ctx context.Context, opts *types.HybridSearchOptions) (*types.SearchResult, error)

SearchHybrid performs hybrid search using Qdrant's native Query API

func (*Store) SearchMMR

func (s *Store) SearchMMR(ctx context.Context, opts *types.MMRSearchOptions) (*types.SearchResult, error)

SearchMMR performs maximal marginal relevance search

func (*Store) SearchSimilar

func (s *Store) SearchSimilar(ctx context.Context, opts *types.SearchOptions) (*types.SearchResult, error)

SearchSimilar performs similarity search

func (*Store) SearchWithScoreThreshold

func (s *Store) SearchWithScoreThreshold(ctx context.Context, opts *types.ScoreThresholdOptions) (*types.SearchResult, error)

SearchWithScoreThreshold performs similarity search with score threshold

func (*Store) UpdateMetadata

func (s *Store) UpdateMetadata(ctx context.Context, collectionName string, updates []types.DocumentMetadataUpdate, defaultMetadata map[string]interface{}) error

UpdateMetadata updates metadata for specific documents using Qdrant's SetPayload API

Jump to

Keyboard shortcuts

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