Documentation
¶
Index ¶
- type Store
- func (s *Store) AddDocuments(ctx context.Context, opts *types.AddDocumentOptions) ([]string, error)
- func (s *Store) Backup(ctx context.Context, writer io.Writer, opts *types.BackupOptions) error
- func (s *Store) Close() error
- func (s *Store) CollectionExists(ctx context.Context, collectionName string) (bool, error)
- func (s *Store) Connect(ctx context.Context, storeConfig ...types.VectorStoreConfig) error
- func (s *Store) Count(ctx context.Context, collectionName string, filter map[string]interface{}) (int64, error)
- func (s *Store) CreateCollection(ctx context.Context, opts *types.CreateCollectionOptions) error
- func (s *Store) DeleteDocuments(ctx context.Context, opts *types.DeleteDocumentOptions) error
- func (s *Store) DescribeCollection(ctx context.Context, collectionName string) (*types.VectorStoreStats, error)
- func (s *Store) Disconnect(ctx context.Context) error
- func (s *Store) DropCollection(ctx context.Context, collectionName string) error
- func (s *Store) GetClient() *qdrant.Client
- func (s *Store) GetConfig() types.VectorStoreConfig
- func (s *Store) GetDocuments(ctx context.Context, ids []string, opts *types.GetDocumentOptions) ([]*types.Document, error)
- func (s *Store) GetLoadState(ctx context.Context, collectionName string) (types.LoadState, error)
- func (s *Store) GetMetadata(ctx context.Context, collectionName string, documentID string) (map[string]interface{}, error)
- func (s *Store) GetSearchEngineStats(ctx context.Context, collectionName string) (*types.SearchEngineStats, error)
- func (s *Store) GetStats(ctx context.Context, collectionName string) (*types.VectorStoreStats, error)
- func (s *Store) IsConnected() bool
- func (s *Store) ListCollections(ctx context.Context) ([]string, error)
- func (s *Store) ListDocuments(ctx context.Context, opts *types.ListDocumentsOptions) (*types.PaginatedDocumentsResult, error)
- func (s *Store) LoadCollection(ctx context.Context, collectionName string) error
- func (s *Store) Optimize(ctx context.Context, collectionName string) error
- func (s *Store) ReleaseCollection(ctx context.Context, collectionName string) error
- func (s *Store) Restore(ctx context.Context, reader io.Reader, opts *types.RestoreOptions) error
- func (s *Store) ScrollDocuments(ctx context.Context, opts *types.ScrollOptions) (*types.ScrollResult, error)
- func (s *Store) SearchBatch(ctx context.Context, opts []types.SearchOptionsInterface) ([]*types.SearchResult, error)
- func (s *Store) SearchHybrid(ctx context.Context, opts *types.HybridSearchOptions) (*types.SearchResult, error)
- func (s *Store) SearchMMR(ctx context.Context, opts *types.MMRSearchOptions) (*types.SearchResult, error)
- func (s *Store) SearchSimilar(ctx context.Context, opts *types.SearchOptions) (*types.SearchResult, error)
- func (s *Store) SearchWithScoreThreshold(ctx context.Context, opts *types.ScoreThresholdOptions) (*types.SearchResult, error)
- func (s *Store) UpdateMetadata(ctx context.Context, collectionName string, ...) error
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 NewStoreWithConfig ¶
func NewStoreWithConfig(config types.VectorStoreConfig) *Store
NewStoreWithConfig creates a new Qdrant vector store instance with a configuration
func (*Store) AddDocuments ¶
AddDocuments adds documents to the collection
func (*Store) Backup ¶
Backup creates a backup of the collection using Qdrant's native snapshot functionality
func (*Store) CollectionExists ¶
CollectionExists checks if a collection exists
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 ¶
CreateCollection creates a new collection in Qdrant
func (*Store) DeleteDocuments ¶
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 ¶
Disconnect closes the connection to Qdrant server
func (*Store) DropCollection ¶
DropCollection deletes a collection
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 ¶
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 ¶
IsConnected returns whether the store is connected
func (*Store) ListCollections ¶
ListCollections returns a list of all collections
func (*Store) ListDocuments ¶
func (s *Store) ListDocuments(ctx context.Context, opts *types.ListDocumentsOptions) (*types.PaginatedDocumentsResult, error)
ListDocuments lists documents with pagination (Deprecated)
func (*Store) LoadCollection ¶
LoadCollection loads a collection (for databases that support it) For Qdrant, this is a no-op as collections are always loaded
func (*Store) ReleaseCollection ¶
ReleaseCollection releases a collection (for databases that support it) For Qdrant, this is a no-op as collections cannot be unloaded
func (*Store) Restore ¶
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