Elasticsearch -刪除索引(index)


刪除單個:

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM