Given this Elasticsearch delete request, what is the expected response status?
DELETE /library/_doc/123If the document exists, deleting it returns a deleted result.
The delete request returns {"result":"deleted"} if the document with ID 123 exists and is removed successfully.
What is the response when deleting a document that does not exist in the index?
DELETE /library/_doc/9999Deleting a non-existing document returns not_found in the result.
If the document ID 9999 does not exist, the delete response shows {"result":"not_found"}.
Identify the error in this delete request and the cause of failure.
DELETE /library/_doc/
The delete API requires a document ID after the type.
The request is missing the document ID after _doc/. This causes a syntax error in the URL.
Which Elasticsearch API call deletes all documents where status is obsolete?
The _delete_by_query API deletes documents matching a query.
Option B uses the correct _delete_by_query endpoint with a term query to delete documents where status is obsolete.
What error results from this malformed delete request?
DELETE /library/_doc/123 {"query": {"match_all": {}}}
The document delete API does not accept a request body.
Sending a request body with a DELETE on a specific document ID causes a 400 Bad Request error because the API does not expect a body.