weaviate

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

func WithClassPrefix(prefix string) Option

WithClassPrefix sets the class prefix for the Weaviate store

func WithDistanceMetric

func WithDistanceMetric(metric string) Option

WithDistanceMetric sets the distance metric for the Weaviate store

func WithEmbedder

func WithEmbedder(embedder embedding.Client) Option

WithEmbedder sets the embedder for the Weaviate store

func WithLogger

func WithLogger(logger logging.Logger) Option

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

func (s *Store) CreateTenant(ctx context.Context, tenantName string) error

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

func (s *Store) DeleteTenant(ctx context.Context, tenantName string) error

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

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

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

Jump to

Keyboard shortcuts

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