Delete Index Errors Operation



Delete errors from all indexes

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

// Execute the operation by passing it to Maintenance.Send
store.Maintenance.Send(deleteIndexErrorsOp);

// All errors from ALL indexes are deleted
// Define the delete index errors operation
var deleteIndexErrorsOp = new DeleteIndexErrorsOperation();

// Execute the operation by passing it to Maintenance.SendAsync
await store.Maintenance.SendAsync(deleteIndexErrorsOp);

// All errors from ALL indexes are deleted

Delete errors from specific indexes

// Define the delete index errors operation from specific indexes
var deleteIndexErrorsOp = new DeleteIndexErrorsOperation(new[] { "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
store.Maintenance.Send(deleteIndexErrorsOp);

// Only errors from index "Orders/Totals" are deleted
// Define the delete index errors operation from specific indexes
var deleteIndexErrorsOp = new DeleteIndexErrorsOperation(new[] { "Orders/Totals" });

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

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

Syntax

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