Doubt about accomplishing aggregations in Kibana

Hi,

I am learning in depth about aggregations and going through the official doc.
Just wanted to confirm my understanding that some of the examples given there cannot be accomplished using Kibana and are meant to be implemented by client applications.
To give an example consider this query in Range Aggregations
I tried using the JSON input to specify stats sub-aggregation, but it merges with the range aggregation instead of as a sub-aggregation.

GET /_search
{
    "aggs" : {
        "price_ranges" : {
            "range" : {
                "field" : "price",
                "ranges" : [
                    { "to" : 100 },
                    { "from" : 100, "to" : 200 },
                    { "from" : 200 }
                ]
            },
            "aggs" : {
                "price_stats" : {
                    "stats" : { "field" : "price" }
                }
            }
        }
    }
}

So is my understanding correct that the above query cannot be drafted using Kibana (unless of course I have my custom visualization)?

-Thanks
Nikhil

Hello,

You are indeed right, you would have to write your own visualization or add it as an aggregation to an existing Kibana visualization. There is an open enhancement request for it here:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.