VectorStoreCore
Core read/write contract for persistent vector storage and similarity search (REQ-16).
Every vector-store adapter — including edge/serverless adapters that cannot manage indexes at runtime (Cloudflare Vectorize, Upstash Vector) — MUST implement this interface.
Index lifecycle (create/delete) is split out as VectorStoreIndexAdmin
(REQ-17) so edge adapters that provision indexes out-of-band don’t
have to ship silent no-ops or throwing stubs.
Callers that need admin capabilities gate with hasIndexAdmin(store).
Methods
Section titled “Methods”describeIndex()
Section titled “describeIndex()”describeIndex(indexName): Promise<IndexStats>;Get statistics about an index.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<IndexStats>
listIndexes()
Section titled “listIndexes()”listIndexes(): Promise<string[]>;List all index names in this vector store.
Edge adapters that are provisioned as a single logical index
return that index’s name (typically ['default']).
Returns
Section titled “Returns”Promise<string[]>
query()
Section titled “query()”query(indexName, params): Promise<VectorQueryResult[]>;Query an index for vectors similar to the given query vector.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<VectorQueryResult[]>
upsert()
Section titled “upsert()”upsert(indexName, entries): Promise<void>;Insert or update vector entries in an index. If an entry with the same ID exists, it is overwritten.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>