Sort aggregations order in response


(Vreen) #1

Hi,

I just wonder if I can have influence the order of the aggreated fields in the server response.

example:

{
"aggs": {
    "width": {
        "terms": {
            "field": "width"
        }
    },
    "height": {
        "terms": {
            "field": "height"
        }
    },
    "depth": {
        "terms": {
            "field": "depth"
        }
    },
    "material": {
        "terms": {
            "field": "material"
        }
    }
}}

In the response my fields are in a different order (depth, material, width, height).

Would be great if someone had a hint for me.

Cheers,
Sascha


(system) #2