Documentation
¶
Index ¶
- type Option
- type Store
- func (s *Store) Delete(ctx context.Context, ids []string, options ...interfaces.DeleteOption) error
- func (s *Store) Get(ctx context.Context, ids []string) ([]interfaces.Document, error)
- func (s *Store) Search(ctx context.Context, query string, limit int, ...) ([]interfaces.SearchResult, error)
- func (s *Store) SearchByVector(ctx context.Context, vector []float32, limit int, ...) ([]interfaces.SearchResult, error)
- func (s *Store) Store(ctx context.Context, documents []interfaces.Document, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Store)
Option represents an option for configuring the Weaviate store
func WithClassPrefix ¶
WithClassPrefix sets the class prefix for the Weaviate store
func WithDistanceMetric ¶
WithDistanceMetric sets the distance metric for the Weaviate store
func WithEmbedder ¶
WithEmbedder sets the embedder for the Weaviate store
func WithLogger ¶
WithLogger sets the logger for the Weaviate store
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements the VectorStore interface for Weaviate
func New ¶
func New(config *interfaces.VectorStoreConfig, options ...Option) *Store
New creates a new Weaviate store
func (*Store) Delete ¶
func (s *Store) Delete(ctx context.Context, ids []string, options ...interfaces.DeleteOption) error
Delete removes documents from Weaviate
func (*Store) Search ¶
func (s *Store) Search(ctx context.Context, query string, limit int, options ...interfaces.SearchOption) ([]interfaces.SearchResult, error)
Search searches for similar documents
func (*Store) SearchByVector ¶
func (s *Store) SearchByVector(ctx context.Context, vector []float32, limit int, options ...interfaces.SearchOption) ([]interfaces.SearchResult, error)
SearchByVector searches for similar documents using a vector
func (*Store) Store ¶
func (s *Store) Store(ctx context.Context, documents []interfaces.Document, options ...interfaces.StoreOption) error
Store stores documents in Weaviate
Click to show internal directories.
Click to hide internal directories.