2013-08-28 19:24:34 -04:00
|
|
|
[[indices-get-settings]]
|
2019-07-19 14:35:36 -04:00
|
|
|
=== Get Settings
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
The get settings API allows to retrieve settings of index/indices:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
GET /twitter/_settings
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
// CONSOLE
|
|
|
|
// TEST[setup:twitter]
|
2014-01-05 17:06:02 -05:00
|
|
|
|
|
|
|
[float]
|
2019-07-19 14:35:36 -04:00
|
|
|
==== Multiple Indices and Types
|
2014-01-05 17:06:02 -05:00
|
|
|
|
|
|
|
The get settings API can be used to get settings for more than one index
|
|
|
|
with a single call. General usage of the API follows the
|
|
|
|
following syntax: `host:port/{index}/_settings` where
|
|
|
|
`{index}` can stand for comma-separated list of index names and aliases. To
|
|
|
|
get settings for all indices you can use `_all` for `{index}`.
|
|
|
|
Wildcard expressions are also supported. The following are some examples:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
GET /twitter,kimchy/_settings
|
2014-01-05 17:06:02 -05:00
|
|
|
|
2016-09-01 13:05:22 -04:00
|
|
|
GET /_all/_settings
|
2014-01-05 17:06:02 -05:00
|
|
|
|
2016-09-01 13:05:22 -04:00
|
|
|
GET /log_2013_*/_settings
|
2014-01-05 17:06:02 -05:00
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
// CONSOLE
|
|
|
|
// TEST[setup:twitter]
|
|
|
|
// TEST[s/^/PUT kimchy\nPUT log_2013_01_01\n/]
|
2014-01-05 17:06:02 -05:00
|
|
|
|
|
|
|
[float]
|
2019-07-19 14:35:36 -04:00
|
|
|
==== Filtering settings by name
|
2014-01-05 17:06:02 -05:00
|
|
|
|
2015-10-02 10:43:53 -04:00
|
|
|
The settings that are returned can be filtered with wildcard matching
|
|
|
|
as follows:
|
2014-01-05 17:06:02 -05:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2017-05-01 13:56:39 -04:00
|
|
|
GET /log_2013_-*/_settings/index.number_*
|
2014-01-05 17:06:02 -05:00
|
|
|
--------------------------------------------------
|
2017-05-01 13:56:39 -04:00
|
|
|
// CONSOLE
|
|
|
|
// TEST[continued]
|