This document describes how to use Alibaba Cloud Elasticsearch (ES) to delete documents.

Use the Kibana console to access Alibaba Cloud Elasticsearch, and send the following request to delete documents.
  • Delete a document with a specified ID:
    DELETE /my_index/my_type/2
    If the request is successful, the following result is returned:
    {
      "_index" : "my_index",
      "_type" : "my_type",
      "_id" : "2",
      "_version" : 4,
      "result" : "deleted",
      "_shards" : {
        "total" : 2,
        "successful" : 2,
        "failed" : 0
      },
      "_seq_no" : 3,
      "_primary_term" : 1
    }
  • Delete all documents in a specified index:
    DELETE /my_index
    If the request is successful, the following result is returned:
    {
      "acknowledged" : true
    }