2013-08-28 19:24:34 -04:00
|
|
|
[[indices-delete-index]]
|
2019-08-23 11:29:02 -04:00
|
|
|
=== Delete index API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Delete index</titleabbrev>
|
|
|
|
++++
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2019-08-23 11:29:02 -04:00
|
|
|
Deletes an existing index.
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
2020-07-31 09:51:47 -04:00
|
|
|
DELETE /my-index-000001
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
2020-07-31 09:51:47 -04:00
|
|
|
// TEST[setup:my_index]
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
|
2019-08-23 11:29:02 -04:00
|
|
|
[[delete-index-api-request]]
|
|
|
|
==== {api-request-title}
|
2014-01-04 12:54:17 -05:00
|
|
|
|
2019-08-23 11:29:02 -04:00
|
|
|
`DELETE /<index>`
|
|
|
|
|
|
|
|
|
|
|
|
[[delete-index-api-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
|
|
|
`<index>`::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
(Request, string) Comma-separated list or wildcard expression of indices to
|
|
|
|
delete.
|
|
|
|
|
|
|
|
In this parameter, wildcard expressions match only open, concrete indices. You
|
|
|
|
cannot delete an index using an <<indices-aliases,alias>>.
|
|
|
|
|
|
|
|
To delete all indices, use `_all` or `*` . To disallow the deletion of indices
|
|
|
|
with `_all` or wildcard expressions, change the
|
|
|
|
`action.destructive_requires_name` cluster setting to `true`. You can update
|
|
|
|
this setting in the `elasticsearch.yml` file or using the
|
|
|
|
<<cluster-update-settings,cluster update settings>> API.
|
2020-06-18 16:00:10 -04:00
|
|
|
|
|
|
|
NOTE: You cannot delete the current write index of a data stream. To delete the
|
|
|
|
index, you must <<rollover-data-stream-ex,roll over>> the data stream so a new
|
|
|
|
write index is created. You can then use the delete index API to delete the
|
|
|
|
previous write index.
|
2019-08-23 11:29:02 -04:00
|
|
|
--
|
|
|
|
|
|
|
|
|
|
|
|
[[delete-index-api-query-params]]
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
|
2020-02-24 05:57:32 -05:00
|
|
|
+
|
|
|
|
Defaults to `true`.
|
2019-08-23 11:29:02 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
|
2019-08-23 11:29:02 -04:00
|
|
|
+
|
|
|
|
Defaults to `open`.
|
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
|
2019-08-23 11:29:02 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
|