- Elasticsearch 7.0 Cookbook(Fourth Edition)
- Alberto Paro
- 117字
- 2021-06-24 14:52:16
How it works...
When an index is deleted, all the data related to the index is removed from the disk and is lost.
The deleting process is composed of two steps: first, the cluster is updated, and then the shards are deleted from the storage. This operation is very quick; in a traditional filesystem, it is implemented as a recursive delete.
It's not possible to restore a deleted index if there is no backup.
Also, calling the delete API using the special value _all as an index name can be used to remove all the indices. In production, it is good practice to disable the all-indices deletion by adding the following line to elasticsearch.yml:
action.destructive_requires_name:true