# Mapping issue for Elasticsearch migration from 1.4.0 to 2.3.3

**URL:** <https://discuss.elastic.co/t/mapping-issue-for-elasticsearch-migration-from-1-4-0-to-2-3-3/55995>\
**Category:** Elasticsearch\
**Created:** [July 20, 2016, 2:36pm UTC](https://discuss.elastic.co/t/mapping-issue-for-elasticsearch-migration-from-1-4-0-to-2-3-3/55995 "2016-07-20T14:36:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sunil\_G.C](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@Sunil\_G.C](https://discuss.elastic.co/u/Sunil_G.C)\
**Post date:** [July 20, 2016, 2:36pm UTC](https://discuss.elastic.co/t/mapping-issue-for-elasticsearch-migration-from-1-4-0-to-2-3-3/55995/1 "2016-07-20T14:36:08Z")

</div>

We have run mapping on Elasticsearch 1.4.0 which is elasticsearch 2.3.3 compatible(run on 2.3.3 with no issue).  
While copying mapping from elasticsearch 1.4.0 to 2.3.3 it shows error which is due to index\_analyzer instead of analyzer. And also while running migration plugin it show no error.

**{"root\_cause":[{"type":"mapper\_parsing\_exception","reason":"analyzer on field [contains] must be set when search\_analyzer is set"}],"type":"mapper\_parsing\_exception","reason":"analyzer on field [contains] must be set when search\_analyzer is set"}**

Note:While running mapping for 2.3.3 analyzer become index\_analyzer due to which above issue occur.

How can we avoid this issue while copying mapping from 1.4.0 to 2.3.3?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 20, 2016, 3:18pm UTC](https://discuss.elastic.co/t/mapping-issue-for-elasticsearch-migration-from-1-4-0-to-2-3-3/55995/2 "2016-07-20T15:18:19Z")

</div>

If I read you correctly, you have indices in 1.4.0 which are using `index_analyzer`. When you upgrade the cluster to 2.3.3, everything works fine and the mapping is upgraded using `analyzer` instead.  
Which explains why the migration plugin does not complain.

But if you send a mapping using a "legacy" format (using `index_analyzer` basically), then PUT mapping operation is rejected.

Is that right?

If so, this is expected.

The only way to avoid this error is to send a correct mapping for 2.3.3.

Makes sense?

---

<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:34pm UTC](https://discuss.elastic.co/t/mapping-issue-for-elasticsearch-migration-from-1-4-0-to-2-3-3/55995/3 "2017-07-05T22:34:00Z")

</div>


