The fabriqvec adapter (github.com/xraph/weave/vectorstore/fabriq) implements weave's vectorstore.VectorStore over fabriq's vector plane. Instead of a standalone weave_vectors table (the pgvector store), weave's chunk embeddings persist into fabriq's fabriq_embeddings store — unifying your vector storage with the rest of the fabric and giving fabriq's own agent recall visibility into document chunks.
It is a vector-store backend only: weave keeps its loaders, chunkers, retrievers, and metadata store; just the VectorStore port is fabriq-backed.
import (
"github.com/xraph/weave/engine"
fabriqvec "github.com/xraph/weave/vectorstore/fabriq"
)
eng, err := engine.New(
engine.WithStore(metaStore),
engine.WithVectorStore(fabriqvec.New(f.Vector())),
)New takes a fabriq query.VectorQuerier — obtained from a started fabriq facade via f.Vector(). All weave vectors are namespaced under a single fabriq entity (default weave_vector; override with WithEntity).
Configuration01
fabriqvec.New(f.Vector(),
fabriqvec.WithEntity("kb_chunks"), // fabriq entity namespacing these vectors
)DI auto-discovery
In a Forge app where fabriq is registered in the DI container, EngineOption discovers the facade automatically (no-op when absent, so it is always safe to include):
eng, err := engine.New(
engine.WithStore(metaStore),
fabriqvec.EngineOption(container),
)Behavior02
weave VectorStore | fabriq |
Upsert(entries) | Content is folded into fabriq meta["content"]; Metadata rides alongside in meta. |
Search(vec, opts) | opts.Filter → fabriq metadata filter (meta @> …); opts.TenantKey → fabriq tenant scope; opts.MinScore post-filters; Content/Metadata are reconstructed from meta. |
Delete(ids) / DeleteByMetadata(filter) | fabriq Delete / DeleteByMeta. |
Two intentional differences from the pgvector store:
Searchresults carry a nilVector. Fabriq does not return the raw embedding on a similarity search; consumers useContent,Score, andMetadata. Call fabriq'sGetif you need the vector back.TenantKeymaps to fabriq's native tenant isolation (a first-class scope), not ametadata.tenant_idconvention — stronger isolation. Don't rely on atenant_idmetadata key.
Requirements03
A started fabriq facade with the
fabriq_embeddingstable migrated (fabriq's standard migrations, including the0025GIN index onmetathat keeps metadata filters fast).Operate within a fabriq tenant scope (the ambient context carries it). The namespacing entity does not need to be registered in fabriq's registry —
fabriq_embeddingsaccepts any(tenant, entity, id)triple.
Choosing a vector store04
vectorstore/memory— development and tests.vectorstore/pgvector— standalone Postgres + pgvector, weave-owned table.vectorstore/fabriq— when you already run fabriq and want chunk vectors in the fabric (shared store, unified tenancy, fabriq agent recall over your chunks).