Allow Elasticsearch to allocate the index
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Stack
Generally available
The allocation of data can be controlled using the enable allocation configuration. In certain circumstances users might want to temporarily disable or restrict the allocation of data.
Forgetting to re-allow all data allocation can lead to unassigned shards.
In order to get the shards assigned we’ll need to change the value of the configuration that restricts the assignment of the shards to all.
To allow all data to be allocated, follow these steps.
You can run the following steps using either API console or direct Elasticsearch API calls.
Inspect the
index.routing.allocation.enableindex setting for the index with unassigned shards:JSON GET /my-index-000001/_settings/index.routing.allocation.enable?flat_settingsThe response will look like this:
JSON { "my-index-000001": { "settings": { "index.routing.allocation.enable": "none" } } }- Represents the current configured value that controls if the index is allowed to be partially or totally allocated.
Change the configuration value to allow the index to be fully allocated:
JSON PUT /my-index-000001/_settings{ "index" : { "routing.allocation.enable" : "all" } }- The new value for the
allocation.enableconfiguration for themy-index-000001index is changed to allow all the shards to be allocated.
- The new value for the