[DOCS] Reformat delete index API docs (#45755)
This commit is contained in:
parent
7367855c99
commit
8cac0638a1
|
@ -1,7 +1,10 @@
|
|||
[[indices-delete-index]]
|
||||
=== Delete Index
|
||||
=== Delete index API
|
||||
++++
|
||||
<titleabbrev>Delete index</titleabbrev>
|
||||
++++
|
||||
|
||||
The delete index API allows to delete an existing index.
|
||||
Deletes an existing index.
|
||||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
|
@ -10,13 +13,42 @@ DELETE /twitter
|
|||
// CONSOLE
|
||||
// TEST[setup:twitter]
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
[[delete-index-api-request]]
|
||||
==== {api-request-title}
|
||||
|
||||
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.
|
||||
`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.
|
||||
--
|
||||
|
||||
|
||||
[[delete-index-api-query-params]]
|
||||
==== {api-query-parms-title}
|
||||
|
||||
include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
|
||||
|
||||
include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
|
||||
+
|
||||
Defaults to `open`.
|
||||
|
||||
include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
|
||||
|
||||
include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
|
Loading…
Reference in New Issue