2014-08-12 06:42:12 -04:00
|
|
|
[[indices-get-index]]
|
|
|
|
== Get Index
|
|
|
|
|
2016-09-01 13:05:22 -04:00
|
|
|
The get index API allows to retrieve information about one or more indexes.
|
2014-08-12 06:42:12 -04:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
GET /twitter
|
2014-08-12 06:42:12 -04:00
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
// CONSOLE
|
|
|
|
// TEST[setup:twitter]
|
2014-08-12 06:42:12 -04:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2016-09-01 13:05:22 -04:00
|
|
|
The information returned by the get API can be filtered to include only specific features
|
2014-08-12 06:42:12 -04:00
|
|
|
by specifying a comma delimited list of features in the URL:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
GET twitter/_settings,_mappings
|
2014-08-12 06:42:12 -04:00
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
// CONSOLE
|
|
|
|
// TEST[setup:twitter]
|
2014-08-12 06:42:12 -04:00
|
|
|
|
|
|
|
The above command will only return the settings and mappings for the index called `twitter`.
|
|
|
|
|
2015-12-22 11:08:35 -05:00
|
|
|
The available features are `_settings`, `_mappings` and `_aliases`.
|