OpenSearch/docs/reference/indices/get-settings.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

45 lines
1.3 KiB
Plaintext

[[indices-get-settings]]
== Get Settings
The get settings API allows to retrieve settings of index/indices:
[source,js]
--------------------------------------------------
GET /twitter/_settings
--------------------------------------------------
// CONSOLE
// TEST[setup:twitter]
[float]
=== Multiple Indices and Types
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]
--------------------------------------------------
GET /twitter,kimchy/_settings
GET /_all/_settings
GET /log_2013_*/_settings
--------------------------------------------------
// CONSOLE
// TEST[setup:twitter]
// TEST[s/^/PUT kimchy\nPUT log_2013_01_01\n/]
[float]
=== Filtering settings by name
The settings that are returned can be filtered with wildcard matching
as follows:
[source,js]
--------------------------------------------------
curl -XGET 'http://localhost:9200/2013-*/_settings/name=index.number_*'
--------------------------------------------------