found this thread on how to frame nested aggregations using elasticsearch_dsl Generate multiple buckets in aggregation
can someone show how to iterate through the response to get the second bucket results?
for i in s.aggregations.clients.buckets.num_servers.buckets:
does not work, how else to get to the content in num_servers or server_list?
You need two loops if you want to loop through an second level aggregation. Here is an example assuming 'label' and 'number' fields in your index:
Which would print something like this: