# Geo\_point field extraction with Logstash

**URL:** <https://discuss.elastic.co/t/geo-point-field-extraction-with-logstash/156902>\
**Category:** Logstash\
**Created:** [November 15, 2018, 4:00pm UTC](https://discuss.elastic.co/t/geo-point-field-extraction-with-logstash/156902 "2018-11-15T16:00:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![M.alsioufi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/m.alsioufi/32/52269_2.png) [@M.alsioufi](https://discuss.elastic.co/u/M.alsioufi)\
**Post date:** [November 15, 2018, 4:00pm UTC](https://discuss.elastic.co/t/geo-point-field-extraction-with-logstash/156902/1 "2018-11-15T16:00:28Z")

</div>

I am inserting data from mysql to Elasticsearch using Logstash. Onw of the fields I am inserting is "geoCoordinates". This field is stored in Mysql in the format "lon;lat" I want to insert this field in my elasticsearch as `geo_point` field so I have the following filter:

> ```
> filter {
> mutate {
> split => ["geoCoordinates", ";"]
> add_field => {
> "[geoCoordinates][lon]" => "%{geoCoordinates[0]}"
> "[geoCoordinates][lat]" => "%{geoCoordinates[1]}"
> }
> convert => {
> "[geoCoordinates][lon]" => "float"
> "[geoCoordinates][lat]" => "float"
> }
> }
> }
> 
> ```

however Elasticsearch shows the values like this

> ```
> "geoCoordinates": {
> "lon": "%{geoCoordinates[0]}",
> "lat": "%{geoCoordinates[1]}"
> },
> 
> ```

and another field has the acutal values as string  
`"geoCoordinates": "35.5277933233856;-121.04542218833"`

Any help?

---

<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:** [December 13, 2018, 4:00pm UTC](https://discuss.elastic.co/t/geo-point-field-extraction-with-logstash/156902/2 "2018-12-13T16:00:39Z")

</div>

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