elasticsearch/docs/reference/indices/delete-index.asciidoc
James Rodewig cfae69717a
[DOCS] Update anchor and add redirect for aliases (#77349)
PRs #73062 and #73043 repurposed the `alias` anchor for a new guide for index
and data stream aliases. Previously, this anchor was used for our field alias
documentation.

Repurposing the anchor has caused continuity errors for users selecting
different versions of the ES docs. It could also cause confusion for users with
a `/current/` link to the `alias` page.

This updates the anchor for the alias guide and adds a redirect page to
disambiguate the `alias` anchor.

It also fixes a bread crumb issue for redirects following the 'Modifying your
Data' redirect page.

Closes #77034.
2021-09-07 09:42:42 -04:00

62 lines
1.8 KiB
Text

[[indices-delete-index]]
=== Delete index API
++++
<titleabbrev>Delete index</titleabbrev>
++++
Deletes an existing index.
[source,console]
--------------------------------------------------
DELETE /my-index-000001
--------------------------------------------------
// TEST[setup:my_index]
[[delete-index-api-request]]
==== {api-request-title}
`DELETE /<index>`
[[delete-index-api-prereqs]]
==== {api-prereq-title}
* If the {es} {security-features} are enabled, you must have the `delete_index`
or `manage` <<privileges-list-indices,index privilege>> for the target index.
[[delete-index-api-path-params]]
==== {api-path-parms-title}
`<index>`::
+
--
(Required, string) Comma-separated list of indices to delete. You cannot specify
<<aliases,index aliases>>.
By default, this parameter does not support wildcards (`*`) or `_all`. To use
wildcards or `_all`, change the `action.destructive_requires_name` setting to
`false`. You can update this setting in the `elasticsearch.yml` file or using
the <<cluster-update-settings,cluster update settings>> API. Wildcard patterns
only match open, concrete indices.
NOTE: You cannot delete the current write index of a data stream. To delete the
index, you must <<data-streams-rollover,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.
--
[[delete-index-api-query-params]]
==== {api-query-parms-title}
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
+
Defaults to `true`.
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
+
Defaults to `open`.
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]