Managing index settings

Index settings are more important because they allow us to control several important ElasticSearch functionalities such as sharding/replica, caching, term management, routing, and analysis.

Getting ready

You will need a working ElasticSearch cluster and the index created in the Creating an index recipe in this chapter.

How to do it...

To manage the index settings, we will perform the steps given as follows:

  1. To retrieve the settings of your current Index, the URL format is the following:
    http://<server>/<index_name>/_settings
  2. We are reading information via REST API, so the method will be GET, and an example of a call using the index created in the Creating an index recipe, is:
    curl -XGET 'http://localhost:9200/myindex/_settings' ...

Get ElasticSearch Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.