We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1382c84 commit 41b48fdCopy full SHA for 41b48fd
examples/composite_agg.py
@@ -19,7 +19,11 @@ def run_search(**kwargs):
19
while response.aggregations.comp.buckets:
20
for b in response.aggregations.comp.buckets:
21
yield b
22
- response = run_search(after=response.aggregations.comp.after_key)
+ if 'after_key' in response.aggregations.comp:
23
+ after = response.aggregations.comp.after_key
24
+ else:
25
+ after= response.aggregations.comp.buckets[-1].key
26
+ response = run_search(after=after)
27
28
29
if __name__ == '__main__':
0 commit comments