Hi,
I'm trying to use the kibana Tilemap to show only the latest location received from a device. I'm not exactly sure how or if it can be done, so i ask if any has done something similar.
I have a search query that returns the latest documents send by the devices (the last document for each device), but i am unable to apply it as a filter to my Tilemap.
GET /_search/
{
"size":0,
"query": {
"term": {
"port":2
}
},
"aggs": {
"group": {
"terms": {
"field": "dev_id.keyword"
},
"aggs":{
"group_logs": {
"top_hits": {
"size": 1,
"sort": [
{
"_timestamp": {
"order": "desc"
}
}
]
}
}
}
}
}
}
I want to know if it can be converted to a saved Search that can be applied to the visualization? or if there is any other way to show only the latest position on the tilemap?