[英]DELETE all documents of a type in ElasticSearch 2.x
I've updated ElasticSearch to 2.1 version. 我已将ElasticSearch更新为2.1版本。
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; HTTP / 1.1 400错误请求内容类型:text / plain; charset=UTF-8 字符集= UTF-8
Content-Length: 61 内容长度:61
No handler found for uri [/living/inputs] and method [DELETE] 找不到uri [/ living / inputs]和方法[DELETE]的处理程序
What am I doing wrong? 我究竟做错了什么?
Deleting a mapping type is not supported anymore since 2.0. 自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. 如果您只需要删除文档,则可以使用delete by query插件 ,否则您应该创建一个没有要删除的映射的新索引并重新索引数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.