# Optimizing Indices

**URL:** <https://discuss.elastic.co/t/optimizing-indices/61465>\
**Category:** Elasticsearch\
**Created:** [September 25, 2016, 5:04pm UTC](https://discuss.elastic.co/t/optimizing-indices/61465 "2016-09-25T17:04:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpnoonan](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@tpnoonan](https://discuss.elastic.co/u/tpnoonan)\
**Post date:** [September 25, 2016, 5:04pm UTC](https://discuss.elastic.co/t/optimizing-indices/61465/1 "2016-09-25T17:04:19Z")

</div>

I'm trying to do some index optimization by reducing the amount of replicas after an index really shouldn't be written to anymore. Following this link.  
[https://www.elastic.co/guide/en/elasticsearch/guide/current/retiring-data.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/retiring-data.html)

my curl statement looks like below, going after a distinct index called "logstash-syslog-2016.09.20"

I execute the following statement:

curl -XPOST 'rfdesmstr:9200/logstash-syslog-2016.09.20/\_settings' -d '{ "number\_of\_replicas": 0 }'

I get this in return

{"error":{"root\_cause":[{"type":"invalid\_type\_name\_exception","reason":"Document mapping type name can't start with '_'"}],"type":"invalid\_type\_name\_exception","reason":"Document mapping type name can't start with '_'"},"status":400}

Tried with sense as well and get the same result. Any ideas as to what I'm doing wrong?  
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:** [September 25, 2016, 8:13pm UTC](https://discuss.elastic.co/t/optimizing-indices/61465/2 "2016-09-25T20:13:29Z")

</div>

`curl -XPUT localhost:9200/INDEXNAME/_settings -d '{ "index" : { "number_of_replicas" : 0 } }'`

---

<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:** [September 26, 2016, 5:14am UTC](https://discuss.elastic.co/t/optimizing-indices/61465/3 "2016-09-26T05:14:38Z")

</div>

If it will be something you do regularly, Curator has a [Replicas](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/replicas.html) action, as well as forceMerge and many others.

---

<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, 10:17pm UTC](https://discuss.elastic.co/t/optimizing-indices/61465/4 "2017-07-05T22:17:23Z")

</div>


