WARNING: Version 2.3 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Deleting a document is fairly straightforward. This example shows how to delete our previous customer with the ID of 2:
curl -XDELETE 'localhost:9200/customer/external/2?pretty'
delete-by-query plugin can delete all documents matching a specific query.