Delete Index Errors Operation
-
Use
DeleteIndexErrorsOperation
to delete indexing errors. -
The operation will be executed only on the server node that is defined by the current client-configuration.
-
Deleting the errors will only clear the index errors.
An index with an 'Error state' will Not be set back to 'Normal state'. -
To just get index errors see get index errors.
-
In this page:
Delete errors from all indexes
// Define the delete index errors operation
$deleteIndexErrorsOp = new DeleteIndexErrorsOperation();
// Execute the operation by passing it to Maintenance.Send
$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
$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
$store->maintenance()->send($deleteIndexErrorsOp);
// Only errors from index "Orders/Totals" are deleted
Syntax
// Available overloads:
DeleteIndexErrorsOperation() // Delete errors from all indexes
DeleteIndexErrorsOperation(StringArray|array|string $indexNames) // Delete errors from specific indexes
Parameters | Type | Description |
---|---|---|
$indexNames | StringArray array string |
List of index names to delete errors from. An exception is thrown if any of the specified indexes does not exist. |