August 2019
Intermediate to advanced
560 pages
13h 41m
English
The purpose of this is to aggregate the child documents with the join data type field:
"aggs": { "dividends_for_symbol": { "terms": {"field": "symbol"}, "aggs": {"dividend":{ "children": {"type": "dividend" }, "aggs": {"total_dividend":{"sum":{"field":"amount"}}}}}} }
"aggregations": { "dividends_for_symbol": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "ACWF", "doc_count": 1, "dividend": { "doc_count": 7, "total_dividend": { "value": 1.6313300058245659 } } } ] } }
Read now
Unlock full access