首页 > 代码库 > Elasticsearch之curl删除索引库
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删除索引库