How do I use the GeoPoint object in groovy scripts?
Here is my index mapping:
"geoip": {
"properties": {
"location": {
"type": "geo_point",
"lat_lon": true
}
}
}
I have tried to assign the location with the longitude and latitude in my groovy script:
doc.location = [ lat: 51.503, lon: -0.127 ], and in Kibana, I see these fields in my index:
location.lat 51.503
location.lon -0.127
Now when I try to create a tile map, it sees the field geoip.location but on the map it says "No results found"
I'm wondering if I need to assign doc.location to a GeoPoint object instead of a groovy map?