Managing index settings
Index settings are more important because they allow you to control several important Elasticsearch functionalities such as sharding/replica, caching, term management, routing, and analysis.
Getting ready
You need an up-and-running Elasticsearch installation, as used in the Downloading and installing Elasticsearch recipe in Chapter 2, Downloading and Setup.
To execute curl
via the command line, you need to install curl
for your operative system.
To correctly execute the following commands, use the index created in the Creating an index recipe.
How to do it...
For managing the index settings, we will perform the following steps:
To retrieve the settings of your current index, use the following URL format:
http://<server>/<index_name>/_settings
We are reading information via the REST API, so the method will be
GET
and an example of call, using the index created in the Creating an index recipe, is as follows:curl -XGET 'http://localhost:9200/myindex/_settings...