I've updated ElasticSearch to 2.1 version.
Before of that, I deleted every document in a type using:
curl -XDELETE '<server_node>:<port>/<index>/<type>' -i
curl -XDELETE 'http://ESNode01:9201/living/inputs' -i
From now then, this is the response:
HTTP/1.1 400 Bad Request Content-Type: text/plain; charset=UTF-8
Content-Length: 61
No handler found for uri [/living/inputs] and method [DELETE]
What am I doing wrong?
Elasticsearch provides _delete_by_query REST API to delete multiple documents based on a specified query, Here we need to pass JSON as the request body with POST method, It will delete those document which fulfills by specified query.
You can use _delete_by_query path to delete type. Save this answer.
Deleting an index deletes its documents, shards, and metadata. It does not delete related Kibana components, such as data views, visualizations, or dashboards.
To delete all indices, use _all or * . To disallow the deletion of indices with _all or wildcard expressions, set the action. destructive_requires_name cluster setting to true .
Deleting a mapping type is not supported anymore since 2.0.
If you just need to delete the documents, then you may use the delete by query plugin, otherwise you should create a new index without the mapping you want to delete and reindex your data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With