mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
* Remove `es-test-dir` book-scoped variable * Remove `plugins-examples-dir` book-scoped variable * Remove `:dependencies-dir:` and `:xes-repo-dir:` book-scoped variables - In `index.asciidoc`, two variables (`:dependencies-dir:` and `:xes-repo-dir:`) were removed. - In `sql/index.asciidoc`, the `:sql-tests:` path was updated to fuller path - In `esql/index.asciidoc`, the `:esql-tests:` path was updated idem * Replace `es-repo-dir` with `es-ref-dir` * Move `:include-xpack: true` to few files that use it, remove from index.asciidoc
63 lines
1.7 KiB
Text
63 lines
1.7 KiB
Text
[[indices-delete-index]]
|
|
=== Delete index API
|
|
++++
|
|
<titleabbrev>Delete index</titleabbrev>
|
|
++++
|
|
|
|
Deletes one or more indices.
|
|
|
|
[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-desc]]
|
|
==== {api-description-title}
|
|
|
|
Deleting an index deletes its documents, shards, and metadata. It does not
|
|
delete related {kib} components, such as {data-sources}, visualizations, or
|
|
dashboards.
|
|
|
|
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-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`, set the
|
|
<<action-destructive-requires-name,`action.destructive_requires_name`>> cluster
|
|
setting to `false`.
|
|
|
|
[[delete-index-api-query-params]]
|
|
==== {api-query-parms-title}
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
|
|
+
|
|
Defaults to `true`.
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
|
|
+
|
|
Defaults to `open,closed`.
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
|