2013-08-28 19:24:34 -04:00
|
|
|
[[indices-delete-index]]
|
2019-07-19 14:35:36 -04:00
|
|
|
=== Delete Index
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
The delete index API allows to delete an existing index.
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
DELETE /twitter
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
// CONSOLE
|
|
|
|
// TEST[setup:twitter]
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2017-06-19 04:30:05 -04:00
|
|
|
The above example deletes an index called `twitter`. Specifying an index or a
|
|
|
|
wildcard expression is required. Aliases cannot be used to delete an index.
|
|
|
|
Wildcard expressions are resolved to matching concrete indices only.
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2017-06-19 04:30:05 -04:00
|
|
|
The delete index API can also be applied to more than one index, by either
|
|
|
|
using a comma separated list, or on all indices (be careful!) by using `_all` or `*` as index.
|
2014-01-04 12:54:17 -05:00
|
|
|
|
|
|
|
In order to disable allowing to delete indices via wildcards or `_all`,
|
|
|
|
set `action.destructive_requires_name` setting in the config to `true`.
|
2016-01-10 04:47:44 -05:00
|
|
|
This setting can also be changed via the cluster update settings api.
|