# Unsetting index.routing.allocation.require.\_name setting

**URL:** <https://discuss.elastic.co/t/unsetting-index-routing-allocation-require--name-setting/75964>\
**Category:** Elasticsearch\
**Created:** [February 21, 2017, 10:31pm UTC](https://discuss.elastic.co/t/unsetting-index-routing-allocation-require--name-setting/75964 "2017-02-21T22:31:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamchrismiller](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@iamchrismiller](https://discuss.elastic.co/u/iamchrismiller)\
**Post date:** [February 21, 2017, 10:31pm UTC](https://discuss.elastic.co/t/unsetting-index-routing-allocation-require--name-setting/75964/1 "2017-02-21T22:31:40Z")

</div>

I am attempting to Shrink an index's primary shards down after the bulk import is complete.

Following the guide for preparing an index for shrinking I am unable to reset the settings after the shrink is complete.

[https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html#\_preparing\_an\_index\_for\_shrinking](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html#_preparing_an_index_for_shrinking)

Preparing Settings

PUT some-index/\_settings  
{  
"settings": {  
"number\_of\_replicas": replicas,  
**"index.routing.allocation.require.\_name"** : node\_name,  
"index.blocks.write": true  
}  
}

Then I wait for shard relocation to complete

GET \_cluster/health/INDEX\_NAME?wait\_for\_no\_relocating\_shards=true&timeout=#{timeout\_in\_sec}s"

Next I perform the shrink operation and wait until it is finished.

Then I start performing my cleanup operations including force merging the segments and resetting the shrink settings.

This is where I encounter the issue, After the new index exists and the document count is the same I attempt to reset the setting **index.routing.allocation.require.\_name** so the routing is restored on the bulk imported index.

I have tried setting the value of this attribute to \*, empty string and nil without any luck.

Any help in the right direction would be great.

Thanks.

---

<div class="post-metadata">

**Author:** ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)\
**Post date:** [February 22, 2017, 3:18pm UTC](https://discuss.elastic.co/t/unsetting-index-routing-allocation-require--name-setting/75964/2 "2017-02-22T15:18:52Z")

</div>

Hi Chris,  
which version are you on?

---

<div class="post-metadata">

**Author:** ![iamchrismiller](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@iamchrismiller](https://discuss.elastic.co/u/iamchrismiller)\
**Post date:** [February 22, 2017, 6:38pm UTC](https://discuss.elastic.co/t/unsetting-index-routing-allocation-require--name-setting/75964/3 "2017-02-22T18:38:12Z")

</div>

We are running version 5.2.1

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 22, 2017, 6:38pm UTC](https://discuss.elastic.co/t/unsetting-index-routing-allocation-require--name-setting/75964/4 "2017-03-22T18:38:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
