How to edit the type of an existing fiend in an index

Is there any way to edit an existing type. I have a field "calculated_weight" which is currently a string. I want it to be long so that i can calculate the sum.

I tried this

PUT /mm-logs-* { "mappings": { "properties": { "message": { "properties": { "calculated_weight": { "type": "long" } } } } } }

But it failed with permission problem.

Welcome to our community! :smiley:

You cannot change mappings once they have been created. You will need to update your template and then reindex existing data.

You might be able to get Kibana to treat it as a number if you change the field in the index settings. But that's not a guarantee.

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