# Cannot change omitNorms=false to inconsistent omitNorms=true

**URL:** <https://discuss.elastic.co/t/cannot-change-omitnorms-false-to-inconsistent-omitnorms-true/309361>\
**Category:** Elasticsearch\
**Created:** [July 11, 2022, 10:54pm UTC](https://discuss.elastic.co/t/cannot-change-omitnorms-false-to-inconsistent-omitnorms-true/309361 "2022-07-11T22:54:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnny\_Yang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johnny_yang/32/101700_2.png) [@Johnny\_Yang](https://discuss.elastic.co/u/Johnny_Yang)\
**Post date:** [July 11, 2022, 10:54pm UTC](https://discuss.elastic.co/t/cannot-change-omitnorms-false-to-inconsistent-omitnorms-true/309361/1 "2022-07-11T22:54:27Z")

</div>

I recently used the update\_mapping API to set one of the fields in my index to "norms:false", but then when I try to save new documents to it, it gives error: "{"error":{"root\_cause":[{"type":"illegal\_argument\_exception","reason":"cannot change field "fieldname" from omitNorms=false to inconsistent omitNorms=true"}] in the line document.save(). I couldn't find a document explaining this error, but I suspect it is because old and new documents have different omitNorms values? Could you advise me on this? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Johnny\_Yang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johnny_yang/32/101700_2.png) [@Johnny\_Yang](https://discuss.elastic.co/u/Johnny_Yang)\
**Post date:** [July 15, 2022, 12:41am UTC](https://discuss.elastic.co/t/cannot-change-omitnorms-false-to-inconsistent-omitnorms-true/309361/2 "2022-07-15T00:41:56Z")

</div>

```auto
{'error': {'root_cause': [{'type': 'illegal_argument_exception', 'reason': 'cannot change field "fieldname" from omitNorms=false to inconsistent omitNorms=true'}], 'type': 'illegal_argument_exception', 'reason': 'cannot change field "fieldname" from omitNorms=false to inconsistent omitNorms=true'}, 'status': 400}

```

Noticed that I haven't put the actual error message here, sorry about that and would really appreciate if someone could offer insights!

---

<div class="post-metadata">

**Author:** ![hendry.lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendry.lim/32/71328_2.png) [@hendry.lim](https://discuss.elastic.co/u/hendry.lim)\
**Post date:** [July 15, 2022, 1:40am UTC](https://discuss.elastic.co/t/cannot-change-omitnorms-false-to-inconsistent-omitnorms-true/309361/3 "2022-07-15T01:40:17Z")

</div>

You will need to create a new index with the correct mapping, i.e. `omitNorms: true`. The mapping cannot be changed once index is created.

---

<div class="post-metadata">

**Author:** ![Johnny\_Yang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johnny_yang/32/101700_2.png) [@Johnny\_Yang](https://discuss.elastic.co/u/Johnny_Yang)\
**Post date:** [July 15, 2022, 1:48am UTC](https://discuss.elastic.co/t/cannot-change-omitnorms-false-to-inconsistent-omitnorms-true/309361/4 "2022-07-15T01:48:26Z")

</div>

Hi, thanks for replying. I successfully used the update mapping API to disable "norms" for this specific field, and this happens when I try to update values of documents in the index. Is there a reason why updating needs this norms option to be true?

---

<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:** [August 12, 2022, 1:49am UTC](https://discuss.elastic.co/t/cannot-change-omitnorms-false-to-inconsistent-omitnorms-true/309361/5 "2022-08-12T01:49:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
