August 2019
Intermediate to advanced
560 pages
13h 41m
English
This is similar to the date range aggregation. The difference is using Date Math expression (please refer to the API conventions section of Chapter 1, Overview of Elasticsearch 7) for the from/to range. Note that the from value is inclusive and the to value is exclusive:
"query": { "match": { "symbol": "ACWF"}},"aggs":{"monthly_trading_days": {"date_range":{"field": "date","format": "yyyy-MM-dd","ranges": [{"from":"2018-12-01"},{"to":"2019-04-01"},{"from":"2019-01-01","to":"2019-01-01||+1M"}]}}}
Read now
Unlock full access