# Logstash type error conversion geo\_point type field must be a number

**URL:** https://discuss.elastic.co/t/logstash-type-error-conversion-geo-point-type-field-must-be-a-number/271914
**Category:** Logstash
**Created:** [May 2, 2021, 6:11pm UTC](https://discuss.elastic.co/t/logstash-type-error-conversion-geo-point-type-field-must-be-a-number/271914 "2021-05-02T18:11:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![luis\_vaglian](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@luis\_vaglian](https://discuss.elastic.co/u/luis_vaglian)
#### Post date: [May 2, 2021, 6:11pm UTC](https://discuss.elastic.co/t/logstash-type-error-conversion-geo-point-type-field-must-be-a-number/271914/1 "2021-05-02T18:11:06Z")

</div>

Hi,  
I have created my index pattern to map my csv file(geoLocation in geo\_point)  
'''  
**PUT \_template/geotemplate**  
\*\* {\*\*  
\*\* "index\_patterns": [\*\*  
\*\* "flightgeolocation"\*\*  
\*\* ],\*\*  
\*\* "settings" : {},\*\*  
\*\* "mappings": {\*\*  
\*\* "properties": {\*\*  
\*\* "geolocation" : {\*\*  
\*\* "type" : "geo\_point"\*\*  
\*\* }\*\*  
\*\* }\*\*  
\*\* },\*\*  
\*\* "aliases": {}\*\*  
\*\* }\*\*  
'''

I updated my config file and I have made latitude and longitude in float type and put them as a new field (geLocation)  
'''  
**input { stdin{} }**

* * *

* * *

\*\* filter {\*\*  
\*\* csv {\*\*  
\*\* separator =\> ","\*\*  
\*\* columns =\> \*\*  
\*\* ["Airport\_ID","Name","City","Country","IATA",\*\*  
\*\* "ICAO","Latitude","Longitude","Altitude","Timezone","DST",\*\*  
\*\* "database\_time\_zone","Type","Source"]\*\*

* * *

\*\* }\*\*  
\*\* mutate {convert =\> ["Airport\_ID", "string"] }\*\*  
\*\* mutate {convert =\> ["Name", "string"] }\*\*  
\*\* mutate {convert =\> ["City", "string"] }\*\*  
\*\* mutate {convert =\> ["Country", "string"] }\*\*  
\*\* mutate {convert =\> ["IATA", "string"] }\*\*  
\*\* mutate {convert =\> ["ICAO", "string"] }\*\*  
\*\* mutate {convert =\> ["Latitude", "float"] }\*\*  
\*\* mutate {convert =\> ["Longitude", "float"] }\*\*  
\*\* mutate {convert =\> ["Altitude", "string"] }\*\*  
\*\* mutate {convert =\> ["Timezone", "string"] }\*\*  
\*\* mutate {convert =\> ["DST", "string"] }\*\*  
\*\* mutate {convert =\> ["database\_time\_zone", "string"] }\*\*  
\*\* mutate {convert =\> ["Type", "string"] }\*\*  
\*\* mutate {convert =\> ["Source", "string"] }\*\*  
\*\* mutate {\*\*  
\*\* add\_field =\> {\*\*  
\*\* "geoLocation" =\> "%{Latitude},%{Longitude}"\*\*  
\*\* }\*\*  
\*\* }\*\*  
\*\* }\*\*

* * *

\*\* output {\*\*  
\*\* elasticsearch {\*\*  
\*\* hosts =\> "localhost:9200"\*\*  
\*\* index =\> "flight"\*\*  
\*\* }\*\*

* * *

\*\* stdout { codec =\> rubydebug }\*\*  
\*\* }\*\*  
'''

But I always have the same error :

'''  
**Guinea,GKA,AYGA,6.081689834590001,145.391998291,5282,10,U,PacificPort\_Moresby,airport,OurAirports[2021-05-02T19:45:35,275][WARN][logstash.outputs.elasticsearch][main][6f6097aabf7327a68ae97015b3ece31fcdcae152465b7ff4d6cd4d72dc9e602d] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"flight", :routing=\>nil, :\_type=\>"\_doc"}, #LogStash::Event:0x6001a384], :response=\>{"index"=\>{"\_index"=\>"flight", "\_type"=\>"\_doc", "\_id"=\>"qWovLnkBE-V7VJ24f7oA", "status"=\>400, "error"=\>{"type"=\>"mapper\_parsing\_exception", "reason"=\>"failed to parse field [geoLocation] of type [geo\_point]", "caused\_by"=\>{"type"=\>"parse\_exception", "reason"=\>"latitude must be a number"}}}}}**  
'''

That say that latitude must be a number but that's a number.  
Do you have an idea to resolve the problem ?

---

<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 30, 2021, 6:11pm UTC](https://discuss.elastic.co/t/logstash-type-error-conversion-geo-point-type-field-must-be-a-number/271914/2 "2021-05-30T18:11:22Z")

</div>

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