Documentation
¶
Index ¶
- type Option
- type Store
- func (s *Store) CreateTenant(ctx context.Context, tenantName string) error
- func (s *Store) Delete(ctx context.Context, ids []string, options ...interfaces.DeleteOption) error
- func (s *Store) DeleteTenant(ctx context.Context, tenantName string) error
- func (s *Store) Get(ctx context.Context, id string, options ...interfaces.StoreOption) (*interfaces.Document, error)
- func (s *Store) GlobalDelete(ctx context.Context, ids []string, options ...interfaces.DeleteOption) error
- func (s *Store) GlobalSearch(ctx context.Context, query string, limit int, ...) ([]interfaces.SearchResult, error)
- func (s *Store) GlobalSearchByVector(ctx context.Context, vector []float32, limit int, ...) ([]interfaces.SearchResult, error)
- func (s *Store) GlobalStore(ctx context.Context, documents []interfaces.Document, ...) error
- func (s *Store) ListTenants(ctx context.Context) ([]string, 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) CreateTenant ¶ added in v0.0.24
CreateTenant creates a new tenant for native multi-tenancy
func (*Store) Delete ¶
func (s *Store) Delete(ctx context.Context, ids []string, options ...interfaces.DeleteOption) error
Delete removes documents from Weaviate
func (*Store) DeleteTenant ¶ added in v0.0.24
DeleteTenant deletes a tenant for native multi-tenancy
func (*Store) Get ¶
func (s *Store) Get(ctx context.Context, id string, options ...interfaces.StoreOption) (*interfaces.Document, error)
Get retrieves a single document by ID
func (*Store) GlobalDelete ¶ added in v0.0.24
func (s *Store) GlobalDelete(ctx context.Context, ids []string, options ...interfaces.DeleteOption) error
GlobalDelete deletes documents without tenant context (for shared data)
func (*Store) GlobalSearch ¶ added in v0.0.24
func (s *Store) GlobalSearch(ctx context.Context, query string, limit int, options ...interfaces.SearchOption) ([]interfaces.SearchResult, error)
GlobalSearch searches for documents without tenant context (for shared data)
func (*Store) GlobalSearchByVector ¶ added in v0.0.24
func (s *Store) GlobalSearchByVector(ctx context.Context, vector []float32, limit int, options ...interfaces.SearchOption) ([]interfaces.SearchResult, error)
GlobalSearchByVector searches for documents by vector without tenant context (for shared data)
func (*Store) GlobalStore ¶ added in v0.0.24
func (s *Store) GlobalStore(ctx context.Context, documents []interfaces.Document, options ...interfaces.StoreOption) error
GlobalStore stores documents in Weaviate without tenant context (for shared data)
func (*Store) ListTenants ¶ added in v0.0.24
ListTenants lists all tenants for native multi-tenancy
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 with optional tenant support