InMemoryVectorStore
In-memory vector store for development and testing. Uses brute-force similarity search (O(n) per query). Not suitable for production workloads.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InMemoryVectorStore(): InMemoryVectorStore;Returns
Section titled “Returns”InMemoryVectorStore
Methods
Section titled “Methods”createIndex()
Section titled “createIndex()”createIndex(params): Promise<void>;Create a new vector index with the specified configuration. Implementations SHOULD be idempotent.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”VectorStoreIndexAdmin.createIndex
deleteIndex()
Section titled “deleteIndex()”deleteIndex(indexName): Promise<void>;Delete an index and all its vectors.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”VectorStoreIndexAdmin.deleteIndex
deleteVectors()
Section titled “deleteVectors()”deleteVectors(indexName, params): Promise<void>;Delete specific vectors from an index, either by id or by filter.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
{ |
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”VectorStoreIndexAdmin.deleteVectors
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>
Implementation of
Section titled “Implementation of”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[]>
Implementation of
Section titled “Implementation of”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[]>
Implementation of
Section titled “Implementation of”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>