# Deleting index setting

**URL:** <https://discuss.elastic.co/t/deleting-index-setting/33676>\
**Category:** Elasticsearch\
**Created:** [November 3, 2015, 9:55pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676 "2015-11-03T21:55:19Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [November 3, 2015, 9:55pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/1 "2015-11-03T21:55:19Z")

</div>

Hi All,

I added a index setting using below curl command

```
curl -XPUT 'localhost:9200/<myindex>/_settings' \
    -d '{"index.routing.allocation.disable_allocation": false}'

```

Now I want to remove this setting and bring back the index to it's default state. I tried with below command

```
curl -XDELETE 'localhost:9200/<myindex>/_settings' -d '{"index.routing.allocation.disable_allocation"}'  

```

but I am getting below exception

```
{"error":"TypeMissingException[[_all] type[[_settings]] missing: No index has the type.]","status":404}

```

How can I remove this setting safely and revert back to default?

Regards,

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 3, 2015, 10:19pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/2 "2015-11-03T22:19:42Z")

</div>

By using `true` instead of `false`:

```
 curl -XPUT 'localhost:9200/<myindex>/_settings' \
    -d '{"index.routing.allocation.disable_allocation": true}'
```

---

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [November 3, 2015, 10:23pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/3 "2015-11-03T22:23:14Z")

</div>

> [@theuntergeek](#):
>
> index.routing.allocation.disable\_allocation

What is the default value of index.routing.allocation.disable\_allocation? Is it true?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 3, 2015, 10:25pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/4 "2015-11-03T22:25:52Z")

</div>

It's false, because you want want things to be allocated.

---

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [November 3, 2015, 10:30pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/5 "2015-11-03T22:30:17Z")

</div>

Basically the issue was, one of my index went to bad state and all the shards where UNASSIGNED. So I executed below command to start the shards

```
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
     "commands": [
        {
            "allocate": {
                "index": "<Myindex>",
                "shard": '4',
                "node": "MyNode",
                "allow_primary": true
          }
        }
    ]
  }'

```

So what all other things I need to take care of before executing this command? What I did was I set `index.routing.allocation.disable_allocation` to false and executed reroute command.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 3, 2015, 10:37pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/6 "2015-11-03T22:37:49Z")

</div>

See [https://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-update-settings.html:](https://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-update-settings.html:)

> `index.routing.allocation.disable_allocation`  
> Disable allocation. Defaults to false. Deprecated in favour for index.routing.allocation.enable

Not sure which version you're using. This documentation is from 1.6

---

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [November 3, 2015, 10:44pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/7 "2015-11-03T22:44:20Z")

</div>

I am using 1.4.4  
Is it safe to run reroute command when index is in open state?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 3, 2015, 10:59pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/8 "2015-11-03T22:59:04Z")

</div>

> [@Pradeep\_Gowda](#):
>
> Is it safe to run reroute command when index is in open state?

Yes. Elasticsearch will keep using the local copy until re-routing is complete.

---

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [November 3, 2015, 11:04pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/9 "2015-11-03T23:04:04Z")

</div>

Thank you very much Aaron. I have asked this question on another thread. But I like to ask it again here.  
Why primary shards goes to UNASSIGNED state after starting Elasticsearch? This happened couple of times in our production environment and this is scary.

Any help will be greatly appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 3, 2015, 11:19pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/10 "2015-11-03T23:19:26Z")

</div>

There should be something in your logs about why.  
It could be disk space issues?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 3, 2015, 11:19pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/11 "2015-11-03T23:19:50Z")

</div>

That question should stay in its own thread. Let's please try to keep topics uniform.

---

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [November 3, 2015, 11:43pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/12 "2015-11-03T23:43:24Z")

</div>

Hi Mark,  
It is 2TB disk and only 3.1% space has been used. I have gone through all the log's but I am unable to get any information.

Below is the only log I got

```
Failed to save log: org.elasticsearch.action.UnavailableShardsException: [logindex][4] Primary shard is not active or isn't assigned is a known node. Timeout: [1m], request: index .....
    at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.retryBecauseUnavailable(TransportShardReplicationOperationAction.java:785) [elasticsearch-1.4.4.jar:]
    at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.doStart(TransportShardReplicationOperationAction.java:402) [elasticsearch-1.4.4.jar:]
    at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$3.onTimeout(TransportShardReplicationOperationAction.java:501) [elasticsearch-1.4.4.jar:]
    at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:239) [elasticsearch-1.4.4.jar:]
    at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:520) [elasticsearch-1.4.4.jar:]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]
```

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 3, 2015, 11:56pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/13 "2015-11-03T23:56:29Z")

</div>

I notice that you changed your earlier response from using `1.7.1` to `1.4.4`. Are all of the nodes in your cluster running 1.4.4, or are some running 1.7.1?

---

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [November 4, 2015, 12:22am UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/14 "2015-11-04T00:22:52Z")

</div>

Sorry for the typo. By mistake I took the version from a separate cluster.  
It is actually 1.4.4. I have cross verified both client and server. Both are having 1.4.4

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 4, 2015, 6:00pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/15 "2015-11-04T18:00:35Z")

</div>

Please start a new topic for the new question, or use the other thread you mentioned. Thanks.

---

<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:** [July 5, 2017, 11:40pm UTC](https://discuss.elastic.co/t/deleting-index-setting/33676/16 "2017-07-05T23:40:30Z")

</div>


