Approach for determining the structure of the search output of an aggregation from the query

Hi, I am pretty new to Elasticsearch, so maybe this is a stupid question. First and foremost, I am looking to better understand the link between my aggregation query structure and the return structure. Is there a blog or guide about this? Looking for a way to avoid writing custom parsers for the structure returned by an aggregation query. Extra points if you have something in python already. What I am looking for is similar to what happens in Kibana when the system displays certain data in a predictable manner. Pseudocode of what I am looking for:

    query = {...}
    data_addresses=analyze(query)
    response=client.search(query)
    data_i_want = []
    for resp in response: 
        tmp = resp
        for key in data_addresses:
            tmp = tmp[key]
        data_i_want.append(tmp)

So my question is, what is the logic of analyze?

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