Briefly, this error occurs when you’re trying to delete documents in Elasticsearch after a certain period (deleteAfter), but the system fails to execute the operation. This could be due to incorrect syntax, insufficient permissions, or a non-existent index. To resolve this, ensure you’re using the correct syntax for the delete operation. Also, check if the user has the necessary permissions to delete documents. Lastly, verify if the index you’re trying to delete documents from actually exists.
This guide will help you check for common problems that cause the log ” Deleting results after ‘” + deleteAfter + “‘ ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: delete, plugin.
Overview
DELETE is an Elasticsearch API which removes a document from a specific index. This API requires an index name and _id document to delete the document.
Delete a document
DELETE /my_index/_doc/1
Notes
- A delete request throws 404 error code if the document does not already exist in the index.
- If you want to delete a set of documents that matches a query, you need to use delete by query API.
Log Context
Log “Deleting results after ‘” + deleteAfter + “‘” classname is TransportRevertModelSnapshotAction.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
return ActionListener.wrap(response -> { Date deleteAfter = modelSnapshot.getLatestResultTimeStamp(); logger.debug("Removing intervening records: last record: " + deleteAfter + "; last result: " + modelSnapshot.getLatestResultTimeStamp()); logger.info("Deleting results after '" + deleteAfter + "'"); JobDataDeleter dataDeleter = new JobDataDeleter(client; jobId); dataDeleter.deleteResultsFromTime(deleteAfter.getTime() + 1; new ActionListener() { @Override public void onResponse(Boolean success) {
[ratemypost]