store

package
v0.0.0-...-8df8562 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryVectorStore

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

func NewMemoryVectorStore

func NewMemoryVectorStore() *MemoryVectorStore

func (*MemoryVectorStore) AddVector

func (m *MemoryVectorStore) AddVector(id int64, vec []float32, docName string) error

func (*MemoryVectorStore) DeleteVectorsByDoc

func (m *MemoryVectorStore) DeleteVectorsByDoc(docName string) error

func (*MemoryVectorStore) Reset

func (m *MemoryVectorStore) Reset() error

func (*MemoryVectorStore) SearchSimilar

func (m *MemoryVectorStore) SearchSimilar(query []float32, topK int, docNameFilter string) ([]int64, error)

type MetadataStore

type MetadataStore interface {
	Init(path string) error
	SaveChunk(docName string, chunk types.Chunk) (int64, error)
	GetChunkByID(id int64) (types.Chunk, error)
	ListFiles() ([]types.FileMeta, error)
	DeleteFile(name string) error
	Close() error
}

MetadataStore manages files and their associated chunk metadata

type SQLiteStore

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

func NewSQLiteStore

func NewSQLiteStore() *SQLiteStore

func (*SQLiteStore) Close

func (s *SQLiteStore) Close() error

func (*SQLiteStore) DB

func (s *SQLiteStore) DB() *sql.DB

func (*SQLiteStore) DeleteFile

func (s *SQLiteStore) DeleteFile(name string) error

func (*SQLiteStore) GetChunkByID

func (s *SQLiteStore) GetChunkByID(id int64) (types.Chunk, error)

func (*SQLiteStore) Init

func (s *SQLiteStore) Init(path string) error

func (*SQLiteStore) ListFiles

func (s *SQLiteStore) ListFiles() ([]types.FileMeta, error)

func (*SQLiteStore) SaveChunk

func (s *SQLiteStore) SaveChunk(docName string, chunk types.Chunk) (int64, error)

type SQLiteVectorStore

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

func NewSQLiteVectorStore

func NewSQLiteVectorStore(db *sql.DB) (*SQLiteVectorStore, error)

func (*SQLiteVectorStore) AddVector

func (s *SQLiteVectorStore) AddVector(id int64, vec []float32, docName string) error

func (*SQLiteVectorStore) DeleteVectorsByDoc

func (s *SQLiteVectorStore) DeleteVectorsByDoc(docName string) error

func (*SQLiteVectorStore) Reset

func (s *SQLiteVectorStore) Reset() error

func (*SQLiteVectorStore) SearchSimilar

func (s *SQLiteVectorStore) SearchSimilar(query []float32, topK int, docNameFilter string) ([]int64, error)

type VectorStore

type VectorStore interface {
	AddVector(id int64, vec []float32, docName string) error
	SearchSimilar(query []float32, topK int, docNameFilter string) ([]int64, error)
	Reset() error
	DeleteVectorsByDoc(docName string) error
}

VectorStore manages vector representations and similarity search

Jump to

Keyboard shortcuts

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