Cannot change omitNorms=false to inconsistent omitNorms=true

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!

{'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!

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.

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?

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