2013-08-28 19:24:34 -04:00
|
|
|
[[indices-delete-index]]
|
|
|
|
== Delete Index
|
|
|
|
|
|
|
|
The delete index API allows to delete an existing index.
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
$ curl -XDELETE 'http://localhost:9200/twitter/'
|
|
|
|
--------------------------------------------------
|
|
|
|
|
2014-01-04 12:54:17 -05:00
|
|
|
The above example deletes an index called `twitter`. Specifying an index,
|
|
|
|
alias or wildcard expression is required.
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
The delete index API can also be applied to more than one index, or on
|
2014-01-04 12:54:17 -05:00
|
|
|
all indices (be careful!) by using `_all` or `*` as index.
|
|
|
|
|
|
|
|
In order to disable allowing to delete indices via wildcards or `_all`,
|
|
|
|
set `action.destructive_requires_name` setting in the config to `true`.
|
|
|
|
This setting can also be changed via the cluster update settings api.
|