Hi,
In the Transform examples we can find the top_metrics
aggregation. Here is an example:
POST _transform/_preview
{
"source": {
"index": "kibana_sample_data_ecommerce"
},
"pivot": {
"group_by": {
"customer_id": {
"terms": {
"field": "customer_id"
}
}
},
"aggregations": {
"last": {
"top_metrics": {
"metrics": [
{
"field": "email"
},
{
"field": "customer_first_name.keyword"
},
{
"field": "customer_last_name.keyword"
}
],
"sort": {
"order_date": "desc"
}
}
}
}
}
}
I would like the exact same thing, but instead of the email
a geo_point
field.
But, I get the following error:
"Field [location] of type [geo_point] is not supported for aggregation [top_metrics]"
Why it does not work with a geo_point? And is there another aggregation doing the same for geo_point?
In a Transform, is there a way to get that geo_point without a heavy scripted_metric
who will get the information in the source? There is nothing to aggregate or compute, just to take it as it is...