Elasticsearch: A Complete Guide by Dixit Bharvi & Kuc Rafal & Rogozinski Marek & Chhajed Saurabh

Elasticsearch: A Complete Guide by Dixit Bharvi & Kuc Rafal & Rogozinski Marek & Chhajed Saurabh

Author:Dixit, Bharvi & Kuc, Rafal & Rogozinski, Marek & Chhajed, Saurabh
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2017-01-31T05:00:00+00:00


Let's test routing

To show you an example that will illustrate how Elasticsearch allocates shards and which documents are placed on the particular shard, we will use an additional plugin. It will help us visualize what Elasticsearch did with our data. Let's install the Paramedic plugin using the following command:

bin/plugin -install karmi/elasticsearch-paramedic

After restarting Elasticsearch, we can point our browser to http://localhost:9200/_plugin/paramedic/index.html and we will able to see a page with various statistics and information about indices. For our example, the most interesting information is the cluster color that indicates the cluster state and the list of shards and replicas next to every index.

Let's start two Elasticsearch nodes and create an index by running the following command:

curl -XPUT 'localhost:9200/documents' -d '{ "settings": { "number_of_replicas": 0, "number_of_shards": 2 } }'



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.