跳到主要内容

Remove indexes

在 ElasticSearch 中
作者列表
已发布: 2023年12月7日|最后更新: 2023年12月7日

Removing an ElasticSearch indexCopy link to Removing an ElasticSearch index to clipboard

Note


It is only possible to remove an index from the command line

First you can run the following command to return a full list of available indexes:

curl localhost:9200/_cat/indices
copy
Note


If you are using an external ElasticSearch server please substitute 'localhost' for the server's IP address

This will return a list similar to the example below:

curl 192.168.80.98:9200/_cat/indices yellow open help JkSNC5T2R2K_G42lx1YWSQ 1 1 190 174 2.5mb 2.5mb yellow open new TFMEZ9fIT5e596_h_y_nUg 1 1 16 16 92.4kb 92.4kb yellow open helpdesk2 jTXVSyq0Q_aWGhTMJjPH_A 1 1 190 0 1.4mb 1.4mb yellow open dp_helpdesk1 qj3-aDbsTbez3uWxCZqPZw 1 1 2 0 17kb 17kb yellow open helpdesk3 vumxtbORRzu0SIHKn3Dv_g 1 1 212 0 1.4mb 1.4mb yellow open dp_helpdesk2 QFDDTG4tQmy0qae1zulMOA 1 1 2 0 17kb 17kb yellow open helpdesk 8DzG0qn7QXusD7PLC-P_7Q 1 1 16 6 76.5kb 76.5kb
copy

To then remove one of the indexes you run the following command, specifying the index you want to remove:

curl -X DELETE "localhost:9200/<name_of_index>"
copy

Repeat this command to remove every index you want to delete.

有帮助没有帮助
下一个页面External ElasticSearch server
上一个页面View indexes

请登录或注册以提交评论。