weaviate

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host      string `json:"host" yaml:"host"`             // Weaviate 服务地址,如 "localhost:8080"
	Scheme    string `json:"scheme" yaml:"scheme"`         // http 或 https
	ClassName string `json:"class_name" yaml:"class_name"` // Weaviate 类名
	APIKey    string `json:"api_key" yaml:"api_key"`       // API Key(可选)
	Namespace string `json:"namespace" yaml:"namespace"`   // 默认命名空间
}

Config Weaviate 配置

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store Weaviate 向量存储实现

func NewStore

func NewStore(cfg *Config) (*Store, error)

NewStore 创建 Weaviate 存储实例

func (*Store) Close

func (s *Store) Close() error

Close 关闭连接

func (*Store) Delete

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

Delete 删除文档

func (*Store) Query

func (s *Store) Query(ctx context.Context, q vector.Query) ([]vector.Hit, error)

Query 向量检索

func (*Store) Upsert

func (s *Store) Upsert(ctx context.Context, docs []vector.Document) error

Upsert 插入或更新文档

Jump to

Keyboard shortcuts

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