OpenSearch/x-pack/docs/en/rest-api/rollup
Zachary Tong d93b2a2e9a
[Rollup] Only allow aggregating on multiples of configured interval (#32052)
We need to limit the search request aggregations to whole multiples
of the configured interval for both histogram and date_histogram.
Otherwise, agg buckets won't overlap with the rolled up buckets
and the results will be incorrect.

For histogram, the validation is very simple: request must be >= the config,
and modulo evenly.

Dates are more tricky.
- If both request and config are fixed dates, we can convert to millis
and treat them just like the histo
- If both are calendar, we make sure the request is >= the config with
a static lookup map that ranks the calendar values relatively.  All
calendar units are "singles", so they are evenly divisible already
- We disallow any other combination (one fixed, one calendar, etc)
2018-08-29 17:10:00 -04:00
..
delete-job.asciidoc [Docs] All Rollup docs experimental, agg limitations, clarify DeleteJob (#31299) 2018-06-13 15:42:20 -04:00
get-job.asciidoc [Rollup] Improve ID scheme for rollup documents (#32558) 2018-08-03 11:13:25 -04:00
put-job.asciidoc [Rollup] Only allow aggregating on multiples of configured interval (#32052) 2018-08-29 17:10:00 -04:00
rollup-caps.asciidoc [Docs] Tweaks and fixes to rollup docs 2018-08-17 13:37:11 -04:00
rollup-index-caps.asciidoc [Docs] Tweaks and fixes to rollup docs 2018-08-17 13:37:11 -04:00
rollup-job-config.asciidoc [Rollup] Only allow aggregating on multiples of configured interval (#32052) 2018-08-29 17:10:00 -04:00
rollup-search.asciidoc [Rollup] Return empty response when aggs are missing (#32796) 2018-08-23 16:15:37 -04:00
start-job.asciidoc [Docs] All Rollup docs experimental, agg limitations, clarify DeleteJob (#31299) 2018-06-13 15:42:20 -04:00
stop-job.asciidoc [Docs] All Rollup docs experimental, agg limitations, clarify DeleteJob (#31299) 2018-06-13 15:42:20 -04:00