# Creating New indices keeps using the default configuration

**URL:** <https://discuss.elastic.co/t/creating-new-indices-keeps-using-the-default-configuration/57783>\
**Category:** Elasticsearch\
**Created:** [August 11, 2016, 9:02am UTC](https://discuss.elastic.co/t/creating-new-indices-keeps-using-the-default-configuration/57783 "2016-08-11T09:02:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ma5raz](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@ma5raz](https://discuss.elastic.co/u/ma5raz)\
**Post date:** [August 11, 2016, 9:02am UTC](https://discuss.elastic.co/t/creating-new-indices-keeps-using-the-default-configuration/57783/1 "2016-08-11T09:02:44Z")

</div>

We have defined a certain configuration for creating new indices from our application, (number of shards, and number of replicas), however, when checking the newly created indices on production we found that they are created using the default ES configurations (5 shards , 1 replica) and that results always on having yellow cluster status due to having unsigned shards.

---

<div class="post-metadata">

**Author:** ![tanguy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanguy/32/6030_2.png) [@tanguy](https://discuss.elastic.co/u/tanguy)\
**Post date:** [August 11, 2016, 9:09am UTC](https://discuss.elastic.co/t/creating-new-indices-keeps-using-the-default-configuration/57783/2 "2016-08-11T09:09:19Z")

</div>

Hi,

> [@ma5raz](#):
>
> We have defined a certain configuration for creating new indices from our application

How? Using index templates?

---

<div class="post-metadata">

**Author:** ![ma5raz](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@ma5raz](https://discuss.elastic.co/u/ma5raz)\
**Post date:** [August 11, 2016, 9:12am UTC](https://discuss.elastic.co/t/creating-new-indices-keeps-using-the-default-configuration/57783/3 "2016-08-11T09:12:08Z")

</div>

No we create the indices by hitting http requests from with in our code, and we add the needed configurations as a JSON to the request body as follows :

{  
"settings": {  
"index": {  
"number\_of\_shards": 1,  
"number\_of\_replicas": 0  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![tanguy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanguy/32/6030_2.png) [@tanguy](https://discuss.elastic.co/u/tanguy)\
**Post date:** [August 11, 2016, 9:32am UTC](https://discuss.elastic.co/t/creating-new-indices-keeps-using-the-default-configuration/57783/4 "2016-08-11T09:32:20Z")

</div>

This looks good. I suspect the application is not correctly sending the settings when creating the index.

How do you create the indices? Using which client library?

---

<div class="post-metadata">

**Author:** ![ma5raz](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@ma5raz](https://discuss.elastic.co/u/ma5raz)\
**Post date:** [August 11, 2016, 9:41am UTC](https://discuss.elastic.co/t/creating-new-indices-keeps-using-the-default-configuration/57783/5 "2016-08-11T09:41:36Z")

</div>

we use org.apache.commons.httpclient

---

<div class="post-metadata">

**Author:** ![tanguy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanguy/32/6030_2.png) [@tanguy](https://discuss.elastic.co/u/tanguy)\
**Post date:** [August 11, 2016, 10:09am UTC](https://discuss.elastic.co/t/creating-new-indices-keeps-using-the-default-configuration/57783/6 "2016-08-11T10:09:59Z")

</div>

I think you can enable log in debug level and checks that the request sent are conforming with what elasticsearch expects ([https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html))

---

<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:28pm UTC](https://discuss.elastic.co/t/creating-new-indices-keeps-using-the-default-configuration/57783/7 "2017-07-05T22:28:29Z")

</div>


