Skip to main content

deleteDocuments

client.vectorDb.deleteDocuments(id: string, data?: DeleteVectorDocumentsRequest): Promise<unknown>

Deletes documents from a vector collection.

Removes specified documents from the collection based on provided criteria such as document IDs or metadata filters. This operation cleans up the collection and frees storage.

Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the collection
dataDeleteVectorDocumentsRequestNoOptional deletion criteria for selecting documents to remove

Returns

Promise<unknown> — A promise that resolves when documents have been deleted

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.vectorDb.deleteDocuments('id');
console.log(result);