# Migrating from 1.x to 5.x with index settings in the elasticsearch.yml file

**URL:** <https://discuss.elastic.co/t/migrating-from-1-x-to-5-x-with-index-settings-in-the-elasticsearch-yml-file/65067>\
**Category:** Elasticsearch\
**Created:** [November 4, 2016, 9:58pm UTC](https://discuss.elastic.co/t/migrating-from-1-x-to-5-x-with-index-settings-in-the-elasticsearch-yml-file/65067 "2016-11-04T21:58:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sallgeud](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@sallgeud](https://discuss.elastic.co/u/sallgeud)\
**Post date:** [November 4, 2016, 9:58pm UTC](https://discuss.elastic.co/t/migrating-from-1-x-to-5-x-with-index-settings-in-the-elasticsearch-yml-file/65067/1 "2016-11-04T21:58:46Z")

</div>

I thought I'd post this information for anyone else who may be looking for the solution. I could not otherwise find a solution here or online, and wanted to keep this in the ether.

In our 1.7.x elastic we had configured a default text analyzer of "snowball". However, in 2.4.x and 5.0.x, this is not allowed. When we have hundreds of indexes which are created on the fly, without pre-knowledge they are going to be created, this was a problem.

Use Templates!

You can see here we've created a template called "default" which will apply to all indexes that are created "\*" and default to the snowball analyzer. See the templates guide for more settings.

# PUT [http://localhost:9200/\_template/default](http://localhost:9200/_template/default)

# {

# "template": "\*",

# "settings": {

# "index": { "analysis": { "analyzer": { "default": {"type": "snowball" } } } }

# }

# }

---

<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:06pm UTC](https://discuss.elastic.co/t/migrating-from-1-x-to-5-x-with-index-settings-in-the-elasticsearch-yml-file/65067/2 "2017-07-05T22:06:25Z")

</div>


