2013-08-28 19:24:34 -04:00
|
|
|
[[indices-exists]]
|
2019-10-01 17:07:28 -04:00
|
|
|
=== Index exists API
|
2019-08-26 10:07:11 -04:00
|
|
|
++++
|
2019-10-01 17:07:28 -04:00
|
|
|
<titleabbrev>Index exists</titleabbrev>
|
2019-08-26 10:07:11 -04:00
|
|
|
++++
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2019-08-26 10:07:11 -04:00
|
|
|
Checks if an index exists.
|
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
|
|
|
--------------------------------------------------
|
2019-08-26 10:07:11 -04:00
|
|
|
HEAD /twitter
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
2016-08-18 06:36:53 -04:00
|
|
|
// TEST[setup:twitter]
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2018-02-01 16:14:40 -05:00
|
|
|
|
2019-08-26 10:07:11 -04:00
|
|
|
[[indices-exists-api-request]]
|
|
|
|
==== {api-request-title}
|
|
|
|
|
|
|
|
`HEAD /<index>`
|
|
|
|
|
|
|
|
|
|
|
|
[[indices-exists-api-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index]
|
2019-08-26 10:07:11 -04:00
|
|
|
+
|
|
|
|
IMPORTANT: This parameter does not distinguish between an index name and <<indices-aliases,alias>>,
|
2018-02-01 16:14:40 -05:00
|
|
|
i.e. status code `200` is also returned if an alias exists with that name.
|
2019-08-26 10:07:11 -04:00
|
|
|
|
|
|
|
|
|
|
|
[[indices-exists-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-26 10:07:11 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
|
2019-08-26 10:07:11 -04:00
|
|
|
+
|
|
|
|
Defaults to `open`.
|
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
|
2019-08-26 10:07:11 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=include-defaults]
|
2019-08-26 10:07:11 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
|
2019-08-26 10:07:11 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
|
2019-08-26 10:07:11 -04:00
|
|
|
|
|
|
|
|
|
|
|
[[indices-exists-api-response-codes]]
|
|
|
|
==== {api-response-codes-title}
|
|
|
|
|
|
|
|
`200`::
|
|
|
|
Indicates all specified indices or index aliases exist.
|
|
|
|
|
|
|
|
`404`::
|
|
|
|
Indicates one or more specified indices or index aliases **do not** exist.
|