OpenSearch/docs/reference/indices/get-index.asciidoc
Nik Everett 4b219d15d2 Add CONSOLE to a few snippets in reference docs
This allows them to be run in Console and adds them to the list of
docs that are automatically tested as part of the build.

Relates to #18160
2016-09-01 13:08:36 -04:00

35 lines
1.0 KiB
Plaintext

[[indices-get-index]]
== Get Index
The get index API allows to retrieve information about one or more indexes.
[source,js]
--------------------------------------------------
GET /twitter
--------------------------------------------------
// CONSOLE
// TEST[setup:twitter]
The above example gets the information for an index called `twitter`. Specifying an index,
alias or wildcard expression is required.
The get index API can also be applied to more than one index, or on
all indices by using `_all` or `*` as index.
[float]
=== Filtering index information
The information returned by the get API can be filtered to include only specific features
by specifying a comma delimited list of features in the URL:
[source,js]
--------------------------------------------------
GET twitter/_settings,_mappings
--------------------------------------------------
// CONSOLE
// TEST[setup:twitter]
The above command will only return the settings and mappings for the index called `twitter`.
The available features are `_settings`, `_mappings` and `_aliases`.