Get Settings

edit

The get settings API allows to retrieve settings of index/indices:

$ curl -XGET 'http://localhost:9200/twitter/_settings'

Multiple Indices and Types

edit

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:

curl -XGET 'http://localhost:9200/twitter,kimchy/_settings'

curl -XGET 'http://localhost:9200/_all/_settings'

curl -XGET 'http://localhost:9200/2013-*/_settings'

Prefix option

edit

There is also support for a prefix query string option that allows to include only settings matches the specified prefix.

curl -XGET 'http://localhost:9200/my-index/_settings?prefix=index.'

curl -XGET 'http://localhost:9200/_all/_settings?prefix=index.routing.allocation.'

curl -XGET 'http://localhost:9200/2013-*/_settings?name=index.merge.*'

curl -XGET 'http://localhost:9200/2013-*/_settings/index.merge.*'

The first example returns all index settings the start with index. in the index my-index, the second example gets all index settings that start with index.routing.allocation. for all indices, lastly the third example returns all index settings that start with index.merge. in indices that start with 2013-.