Skip to content

VectorResource

VectorResource · Type

vectorResource.delete(ids?: array = [], namespace?: string, deleteAll?: bool = false, filter?: array = []) → Result

Delete vectors by id, by filter, or all in a namespace.

vectorResource.fetch(ids: array, namespace?: string) → Result

Fetch vectors by id.

vectorResource.query(vector?: array = [], namespace?: string, filter?: array = [], topK?: int = 3, includeMetadata?: bool = true, includeValues?: bool = false, id?: string) → Result

Find the vectors nearest to a vector (or to a stored vector by id).

vectorResource.stats() → Result

Statistics for the index: vector counts per namespace.

vectorResource.update(id: string, values?: array = [], sparseValues?: array = [], setMetadata?: array = [], namespace?: string) → Result

Update one vector’s values or metadata.

vectorResource.upsert(vectors: array, namespace?: string) → Result

Insert or replace vectors (each an id, values and optional metadata).