Delete Index Errors Operation



Delete errors from all indexes

// Define the delete index errors operation
const deleteIndexErrorsOp = new DeleteIndexErrorsOperation();

// Execute the operation by passing it to maintenance.send
await store.maintenance.send(deleteIndexErrorsOp);

// All errors from ALL indexes are deleted

Delete errors from specific indexes

// Define the delete index errors operation from specific indexes
const deleteIndexErrorsOp = new DeleteIndexErrorsOperation(["Orders/Totals"]);

// Execute the operation by passing it to maintenance.send
// An exception will be thrown if any of the specified indexes do not exist
await store.maintenance.send(deleteIndexErrorsOp);

// Only errors from index "Orders/Totals" are deleted

Syntax

// Available overloads:
const deleteIndexErrorsOp = new DeleteIndexErrorsOperation();           // Delete errors from all indexes 
const deleteIndexErrorsOp = new DeleteIndexErrorsOperation(indexNames); // Delete errors from specific indexes
Parameters Type Description
indexNames string[] List of index names to delete errors from.
An exception is thrown if any of the specified indexes do not exist.