# How to change type of field from Geo\_Point to Text?

**URL:** <https://discuss.elastic.co/t/how-to-change-type-of-field-from-geo-point-to-text/228964>\
**Category:** Elasticsearch\
**Created:** [April 21, 2020, 5:31am UTC](https://discuss.elastic.co/t/how-to-change-type-of-field-from-geo-point-to-text/228964 "2020-04-21T05:31:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![umay\_fb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umay_fb/32/60582_2.png) [@umay\_fb](https://discuss.elastic.co/u/umay_fb)\
**Post date:** [April 21, 2020, 5:31am UTC](https://discuss.elastic.co/t/how-to-change-type-of-field-from-geo-point-to-text/228964/1 "2020-04-21T05:31:37Z")

</div>

hey all, I have a problem, I put data into elastic type geo\_point but the data had value "NaN, NaN" and 999,999. I get an error like :  
'''  
type: 'mapper\_parsing\_exception',  
reason: 'failed to parse the [destinationLongLat] field of type [geo\_point]',  
caused\_by: [Object]},  
operation: {index: [Object]  
'''  
How change the data type of an existing index from geo\_point to text?

---

<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:** [April 21, 2020, 6:25am UTC](https://discuss.elastic.co/t/how-to-change-type-of-field-from-geo-point-to-text/228964/2 "2020-04-21T06:25:48Z")

</div>

You need to reindex, you can't change the mapping once it's been set and used unfortunately.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 21, 2020, 6:27am UTC](https://discuss.elastic.co/t/how-to-change-type-of-field-from-geo-point-to-text/228964/3 "2020-04-21T06:27:17Z")

</div>

I would recommend cleaning up the data before indexing it instead as you otherwise will not be able to do any kind of geo analysis.

---

<div class="post-metadata">

**Author:** ![umay\_fb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umay_fb/32/60582_2.png) [@umay\_fb](https://discuss.elastic.co/u/umay_fb)\
**Post date:** [April 21, 2020, 7:35am UTC](https://discuss.elastic.co/t/how-to-change-type-of-field-from-geo-point-to-text/228964/4 "2020-04-21T07:35:23Z")

</div>

how about i make new field with changed mapping and delete the old field?

---

<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:** [April 21, 2020, 8:33pm UTC](https://discuss.elastic.co/t/how-to-change-type-of-field-from-geo-point-to-text/228964/5 "2020-04-21T20:33:03Z")

</div>

That'll work 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:** [May 19, 2020, 8:33pm UTC](https://discuss.elastic.co/t/how-to-change-type-of-field-from-geo-point-to-text/228964/6 "2020-05-19T20:33:05Z")

</div>

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