File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,13 @@ class Sampler(Bucket):
209
209
class DiversifiedSampler (Bucket ):
210
210
name = 'diversified_sampler'
211
211
212
+ class Composite (Bucket ):
213
+ name = 'composite'
214
+ _param_defs = {
215
+ 'sources' : {'type' : 'agg' , 'hash' : True },
216
+ 'aggs' : {'type' : 'agg' , 'hash' : True },
217
+ }
218
+
212
219
# metric aggregations
213
220
class TopHits (Agg ):
214
221
name = 'top_hits'
Original file line number Diff line number Diff line change @@ -20,3 +20,11 @@ For simplicity we use a timestamp as version in the index name.
20
20
21
21
More complex example highlighting the possible relationships available in
22
22
elasticsearch - parent/child and nested.
23
+
24
+ ``composite_agg.py ``
25
+ --------------------
26
+
27
+ A helper function using the `composite aggregation
28
+ <https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-composite-aggregation.html> `_
29
+ to paginate over aggregation results.
30
+
You can’t perform that action at this time.
0 commit comments