如果elasticsearch删除索引报错
curl -X DELETE 'http://10.73.26.66:9200/httpd-34-2017.08.15'
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"text is empty"}],"type":"illegal_argument_exception","reason":"text is empty"},"status":400}
是因为你使用是root删除,要用elasticsearch删除,这种情况多为rpm形式安装
删除命令如下:
sudo -u elasticsearch sh -c "curl -XDELETE 'http://10.73.26.66:9200/httpd-34-*'"
{"acknowledged":true}
返回acknowledge为成功
查看索引命令
sudo -u elasticsearch sh -c "curl -X GET http://10.73.26.66:9200/_cat/indices"
注:集群只要在其中一台删除即可