0
votes

I'm attempting to map a field in my data as a geo-point so that I can visualize the data on a map in kibana. The data is stored as a string of coordinates (e.g. "12.35,48.64"). Below is how I've attempted to map the field.

"latlong":{
  "type":"geo-point",
  "fields":{
    "raw":{
      "type":"keyword",
      "ignore_above":256
      }
    }
  },

I pulled code from GET index/_mapping, then altered the type to geo-point, then I get the error

"type": "mapper_parsing_exception", "reason": "Failed to parse mapping [docs]: No handler for type [geo-point] declared on field [latlong]",

Any help is appreciated. I'm brand-new to elasticsearch, so it's probably an easy fix.

1

1 Answers

5
votes

It turned out to be syntax:

geo-point should have been geo_point

Then I got rid of the rest of the fluff:

"latlong":{
   "type":"geo_point"
},

Now it displays beautifully in Kibana.