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

**URL:** <https://discuss.elastic.co/t/how-to-edit-the-type-of-an-existing-fiend-in-an-index/274694>\
**Category:** Kibana\
**Created:** [June 2, 2021, 1:58am UTC](https://discuss.elastic.co/t/how-to-edit-the-type-of-an-existing-fiend-in-an-index/274694 "2021-06-02T01:58:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunoj\_vijayan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunoj_vijayan/32/72152_2.png) [@sunoj\_vijayan](https://discuss.elastic.co/u/sunoj_vijayan)\
**Post date:** [June 2, 2021, 1:58am UTC](https://discuss.elastic.co/t/how-to-edit-the-type-of-an-existing-fiend-in-an-index/274694/1 "2021-06-02T01:58:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 2, 2021, 4:06am UTC](https://discuss.elastic.co/t/how-to-edit-the-type-of-an-existing-fiend-in-an-index/274694/2 "2021-06-02T04:06:04Z")

</div>

Welcome to our community! 😃

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.

---

<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:** [June 30, 2021, 4:06am UTC](https://discuss.elastic.co/t/how-to-edit-the-type-of-an-existing-fiend-in-an-index/274694/3 "2021-06-30T04:06:54Z")

</div>

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