Hi,
I want to use the variable_width_histogram combined with other aggregations, such as min or max
Here is an example of combinated aggregations on a numeric field:
"aggs": {
        "aggregated-items": {
            "variable_width_histogram": {
                "buckets": 5,
                "field": "freespace"
            },
            "aggs": {
                "max-aggs": {
                    "max": {
                        "field": "freespace"
                    }
                }
            }
        }
    }
Here is the result I got:
 "aggregations": {
        "aggregated-items": {
          "buckets": [
                {
                    "min": 100.0,
                    "key": 111.67054263565892,
                    "max": 124.0,
                    "doc_count": 258,
                    "max-aggs": {
                        "value": 200.0
                    }
                },
                {
                    "min": 124.0,
                    "key": 134.45454545454547,
                    "max": 145.0,
                    "doc_count": 198,
                    "max-aggs": {
                        "value": 200.0
                    }
                },
                {
                    "min": 145.0,
                    "key": 157.73333333333332,
                    "max": 171.0,
                    "doc_count": 270,
                    "max-aggs": {
                        "value": 200.0
                    }
                },
                {
                    "min": 172.0,
                    "key": 180.82323232323233,
                    "max": 191.0,
                    "doc_count": 198,
                    "max-aggs": {
                        "value": 200.0
                    }
                },
                {
                    "min": 192.0,
                    "key": 196.11764705882354,
                    "max": 200.0,
                    "doc_count": 85,
                    "max-aggs": {
                        "value": 198.0
                    }
                }
            ]
        }
    }
I don't understant why the max-aggs value is 200.0 in first buckets and why it's 198.0 in the last bucket. I would expect the max-aggs to be the same as the max of the corresponding bucket, ie 124.0 in the first, etc.
So, I would like to know how this max-aggs value is calulcated when used under a variable_width_histogram  ?
Thanks !