# Convert a string field to geopoint

**URL:** <https://discuss.elastic.co/t/convert-a-string-field-to-geopoint/65864>\
**Category:** Elasticsearch\
**Created:** [November 12, 2016, 7:43am UTC](https://discuss.elastic.co/t/convert-a-string-field-to-geopoint/65864 "2016-11-12T07:43:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtarimo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtarimo/32/12282_2.png) [@mtarimo](https://discuss.elastic.co/u/mtarimo)\
**Post date:** [November 12, 2016, 7:43am UTC](https://discuss.elastic.co/t/convert-a-string-field-to-geopoint/65864/1 "2016-11-12T07:43:55Z")

</div>

Hi there,

We made a mistake when we were indexing our data. We have about 7.1m documents (8GB of data). Our location information has been stored as string. We want to convert this data to geopoint for visualization.  
This is how the data is stored;  
t locationLatLon -9.9994516,39.6986348  
The field name is "locationLatLon"  
The value is "-9.9994516,39.6986348"

We have changed the type to geopoint, but it is still indexing as string. We think it is because the data was already indexed as string. However, for new deployments, the same definition gets the data stored as geopoint.

Is there a simple way to convert the string field to geopoint.

Thanks,  
Michael Tarimo

---

<div class="post-metadata">

**Author:** ![henrikno](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henrikno/32/6948_2.png) [@henrikno](https://discuss.elastic.co/u/henrikno)\
**Post date:** [November 14, 2016, 8:47am UTC](https://discuss.elastic.co/t/convert-a-string-field-to-geopoint/65864/2 "2016-11-14T08:47:39Z")

</div>

Moved to Elasticsearch category.

---

<div class="post-metadata">

**Author:** ![henrikno](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henrikno/32/6948_2.png) [@henrikno](https://discuss.elastic.co/u/henrikno)\
**Post date:** [December 5, 2016, 4:47am UTC](https://discuss.elastic.co/t/convert-a-string-field-to-geopoint/65864/3 "2016-12-05T04:47:56Z")

</div>

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