Elasticsearch之curl删除索引库
Posted 大数据和人工智能躺过的坑
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Elasticsearch之curl删除索引库相关的知识,希望对你有一定的参考价值。
关于curl创建索引库的介绍,请移步
Elasticsearch之curl创建索引库
[hadoop@djt002 elasticsearch-2.4.3]$ curl -XPUT \'http://192.168.80.200:9200/zhouls\'
{"error":{"root_cause":[{"type":"index_already_exists_exception","reason":"already exists","index":"zhouls"}],"type":"index_already_exists_exception","reason":"already exists","index":"zhouls"},"status":400}[hadoop@djt002 elasticsearch-2.4.3]$ curl -XPOST \'http://192.168.80.200:9200/zhouls1\'
{"acknowledged":true}[hadoop@djt002 elasticsearch-2.4.3]$
测试完,及时删除。
[hadoop@djt002 elasticsearch-2.4.3]$ curl -XPUT \'http://192.168.80.200:9200/zhouls\'
{"error":{"root_cause":[{"type":"index_already_exists_exception","reason":"already exists","index":"zhouls"}],"type":"index_already_exists_exception","reason":"already exists","index":"zhouls"},"status":400}[hadoop@djt002 elasticsearch-2.4.3]$ curl -XPOST \'http://192.168.80.200:9200/zhouls1\'
{"acknowledged":true}[hadoop@djt002 elasticsearch-2.4.3]$ curl -XDELETE \'http://192.168.80.200:9200/zhouls1\'
{"acknowledged":true}[hadoop@djt002 elasticsearch-2.4.3]$
以上是关于Elasticsearch之curl删除索引库的主要内容,如果未能解决你的问题,请参考以下文章