Hi, I am trying to create a coordinate map based off a geo_point. However, no locations are being shown on my map. To get to this point I first created an index with a mapping:
PUT cm_delivery_locations
{
"settings" : {
"index" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
}
},
"mappings" : {
"properties" : {
"delivery_postcode": { "type": "text" },
"delivery_date": { "type": "date" },
"delivery_location" : {
"dynamic" : true,
"properties" : {
"location" : { "type" : "geo_point" },
"latitude" : { "type" : "half_float" },
"longitude" : { "type" : "half_float" }
}
}
}
},
"aliases": { ".cm" : {} }
}
Then using Logstash I input the data. Here is a snippet of the log stash config
filter {
mutate {
add_field => { "[delivery_location][latitude]" => "%{[latlong][0]}" }
add_field => { "[delivery_location][lonitude]" => "%{[latlong][1]}" }
}
mutate {
convert => { "[delivery_location][latitude]" => "float" }
convert => { "[delivery_location][longitude]" => "float" }
}
}
}
Here is what Logstash puts into ES:
{
"delivery_date" => 2018-09-16T23:00:00.000Z,
"delivery_postcode" => "XXX XXX",
"delivery_location" => {
"lat" => XX.XXXXXXXXXXX,
"lon" => -X.XXXXXXXXXXX
}
And the Logstash output:
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "cm_delivery_locations"
manage_template => true
template => "/etc/elasticsearch/templates/cm_delivery_locations.json"
template_name => "cm_delivery_locations"
template_overwrite => "true"
}
stdout { codec => rubydebug }
}
In Kibana I have created an index pattern, which shows 'delivery_location.location' as type geo_point. Discover shows the correct lat/long coordinates on search. Under visualisations, when I add a new visualisation, I am able to select 'delivery_location.location' as a Geohash (aggregation). However, when clicking the play button nothing shows on the map. Is there a way to see what is in the geo_point location field? Or have I missed something obvious?
Thanks,
Adam