October 2019
Beginner
186 pages
5h 39m
English
This metric aggregation computes the sum of numeric values extracted from aggregated documents:
POST /sales/_search?size=0{ "query": { "constant_score": { "filter": { "match": { "type": "hat" } } } }, "aggs": { "hat_prices": { "sum": { "field": "price" } } }}
In the preceding example, we are fetching the sum of the price field.
Read now
Unlock full access