OpenSearch/docs/reference/indices/delete-index.asciidoc
Nik Everett 4b219d15d2 Add CONSOLE to a few snippets in reference docs
This allows them to be run in Console and adds them to the list of
docs that are automatically tested as part of the build.

Relates to #18160
2016-09-01 13:08:36 -04:00

21 lines
767 B
Plaintext

[[indices-delete-index]]
== Delete Index
The delete index API allows to delete an existing index.
[source,js]
--------------------------------------------------
DELETE /twitter
--------------------------------------------------
// CONSOLE
// TEST[setup:twitter]
The above example deletes an index called `twitter`. Specifying an index,
alias or wildcard expression is required.
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.
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.