const response = await index.delete(["star-wars", "inception"]);
// { deleted: 2 }

The delete method allows you to delete documents from your index using various criteria. You can delete documents by their IDs, by ID prefix or with metadata filter.

Arguments

IDs
string[] | number[] | string | number
required

One or more document IDs to delete.

OR

DeletePayload
object
required

Response

Response
DeleteResult
required
const response = await index.delete(["star-wars", "inception"]);
// { deleted: 2 }