# Es 2.2: Validating fields only defined once

**URL:** <https://discuss.elastic.co/t/es-2-2-validating-fields-only-defined-once/42393>\
**Category:** Elasticsearch\
**Created:** [February 22, 2016, 2:06pm UTC](https://discuss.elastic.co/t/es-2-2-validating-fields-only-defined-once/42393 "2016-02-22T14:06:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Hudson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_hudson/32/1306_2.png) [@Brian\_Hudson](https://discuss.elastic.co/u/Brian_Hudson)\
**Post date:** [February 22, 2016, 2:06pm UTC](https://discuss.elastic.co/t/es-2-2-validating-fields-only-defined-once/42393/1 "2016-02-22T14:06:37Z")

</div>

Attempting to upgrade from ES 2.0 to 2.2 but when I do I am unable to index any documents.

It looks like it is related to pull request #15243, where now ES validates that a field is only defined once. We have \_type defined in our mapping and included in the JSON docs we are attempting to index.

I've resolved these issues, our type mapping generator no longer outputs a mapping for \_type and it is no longer included in our JSON docs. This resolves the issue moving forward. But what about our existing indexes? Is there any way to repair them or are they now broken forever (ES 2.2+)?

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [February 22, 2016, 6:31pm UTC](https://discuss.elastic.co/t/es-2-2-validating-fields-only-defined-once/42393/2 "2016-02-22T18:31:07Z")

</div>

Unfortunately, mappings are append-only so this data can't be used in ES 2.2+.

---

<div class="post-metadata">

**Author:** ![Brian\_Hudson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_hudson/32/1306_2.png) [@Brian\_Hudson](https://discuss.elastic.co/u/Brian_Hudson)\
**Post date:** [February 22, 2016, 6:39pm UTC](https://discuss.elastic.co/t/es-2-2-validating-fields-only-defined-once/42393/3 "2016-02-22T18:39:41Z")

</div>

I was afraid that was the answer. Guess we'll have to wait until we are willing to reindex before the 2.2 upgrade, I really wanted those geo\_point updates too!

---

<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:14pm UTC](https://discuss.elastic.co/t/es-2-2-validating-fields-only-defined-once/42393/4 "2017-07-05T23:14:22Z")

</div>


