刪除單個:
DELETE /index
curl -XDELETE 'http://192.169.1.666:9200/index
你也可以這樣刪除多個索引:
DELETE /index_one,index_two
curl -XDELETE 'http://192.169.1.666:9200/index_one,index_two
DELETE /index_*
curl -XDELETE 'http://192.169.1.666:9200/index_*
刪除 全部 索引(強烈不建議):
DELETE /_all
curl -XDELETE 'http://192.169.1.666:9200/_all
DELETE /*
curl -XDELETE 'http://192.169.1.666:9200/*
刪除全部索引操作非常危險,禁止措施
elasticsearch.yml 做如下配置:action.destructive_requires_name: true
這個設置使刪除只限於特定名稱指向的數據, 而不允許通過指定 _all 或通配符來刪除指定索引庫
轉載於:https://blog.csdn.net/qq_37279783/article/details/98761642