Help us shape the future of Go! Take the 2026 Go Developer Survey

vecseed

package
v0.2.50 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package vecseed is the vector store-seed Materializer: it reconciles VECTORS/<collection>.jsonl packs (chassis/storeseed) into a vector.Store.

A pack is NDJSON, one item per line:

{"id":"…","vector":[…pre-computed floats…],"metadata":{…},"text":"…","model":"…"}

Vectors are PRE-COMPUTED at build time (apply must stay offline + deterministic and N data-plane nodes must not each re-embed). The collection's dimension is derived from the vectors; its embedding model is the optional per-item "model" (first non-empty wins) — it documents what the query path must embed with so query vectors stay comparable. Each pack OWNS its collection: reconcile upserts every item and deletes any store item absent from the pack (desired-state sync).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	ID       string         `json:"id"`
	Vector   []float32      `json:"vector"`
	Metadata map[string]any `json:"metadata,omitempty"`
	Text     string         `json:"text,omitempty"`
	Model    string         `json:"model,omitempty"`
}

Item is one line of a VECTORS pack. It mirrors vector.Item plus an optional per-pack embedding-model declaration used to pin the collection.

type Materializer

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

Materializer reconciles VECTORS packs into a vector.Store.

func New

func New(store vector.Store, shared bool) *Materializer

New builds the vector Materializer. shared declares whether store is a fleet-shared backend (pgvector) — reconciled once on the origin — or per-node (sqlite-vec) — reconciled on every node. The wiring layer (server.go) knows which backend it opened and passes the answer.

func (*Materializer) Kind

func (m *Materializer) Kind() string

func (*Materializer) Reconcile

func (m *Materializer) Reconcile(ctx context.Context, scope storeseed.Scope, packs []storeseed.RawPack) error

func (*Materializer) Shared

func (m *Materializer) Shared() bool

Jump to

Keyboard shortcuts

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