diff --git a/docs/reference/rollup/apis/rollup-api.asciidoc b/docs/reference/rollup/apis/rollup-api.asciidoc index 8702edb1b7934..da3a1cacac8e5 100644 --- a/docs/reference/rollup/apis/rollup-api.asciidoc +++ b/docs/reference/rollup/apis/rollup-api.asciidoc @@ -53,8 +53,10 @@ POST /my-index-000001/_rollup/rollup-my-index-000001 * You can only roll up an index that contains: -** A <> or <> timestamp field -** One or more <> fields +** A <> or <> timestamp field. +** At least one metric to roll up. This field must be a <>, + `date`, or `date_nanos` field other than the timestamp field. This field + cannot be an `unsigned_long`. * If the {es} {security-features} are enabled, you must have the `manage` <> for the index you roll up. @@ -85,7 +87,7 @@ for the same stream. // tag::rollup-config[] `groups`:: (Required, object) -Aggregates and stores fields in the rollup. +Aggregates and groups documents in the rollup. + .Properties of `groups` [%collapsible%open] @@ -104,6 +106,9 @@ Groups documents based on a provided time interval. <> or <> field containing a timestamp. If you're rolling up a backing index or using the {ecs-ref}[Elastic Common Schema (ECS)], we recommend using `@timestamp`. ++ +WARNING: Do not use this field in `metrics`. If you do, the rollup attempt will +fail. `calendar_interval` or `fixed_interval`:: (Required, <>) @@ -125,18 +130,18 @@ Defaults to `+00:00` (UTC). `histogram`:: (Optional, <> object) -Groups and stores <> field values based on a provided interval. +Groups documents based on a numeric interval. + .Properties of `histogram` [%collapsible%open] ====== `fields`:: (Required*, string or array of strings) -<> fields to group. If you specify a `histogram` object, this -property is required. +<> fields to group. `unsigned_long` fields are not supported. If +you specify a `histogram` object, this property is required. + -WARNING: Do not use the same fields in `histogram` and `metrics`. If you specify -the same field in both `histogram` and `metrics`, the rollup attempt will fail. +WARNING: Do not use these fields in `metrics`. If you do, the rollup attempt +will fail. `interval`:: (Required*, integer) @@ -147,36 +152,44 @@ object, this property is required. `terms`:: (Optional, <> object) -Groups and stores unique values for <> and -<> fields. +Groups documents based on unique field values. + .Properties of `terms` [%collapsible%open] ====== `fields`:: -(Required*, string or array of strings) -<> and <> fields to store. If you -specify a `terms` object, this property is required. + +-- +(Required*, string or array of strings) +Fields to store unique values for. Supports the following field types: + +* <> types +* <> types, excluding `unsigned_long` +* <> fields with <> enabled + +If you specify a `terms` object, this property is required. + TIP: Avoid storing high-cardinality fields. High-cardinality fields can greatly increase the size of the resulting rollup index. +-- ====== ===== `metrics`:: (Required, object or array of objects) -Collects and stores metrics for <> fields. You must specify at -least one `metrics` object. +Collects and stores metrics for fields. You must specify at least one `metrics` +object. + .Properties of `metrics` objects [%collapsible%open] ===== `field`:: (Required, string) -<> field to collect metrics for. +<>, <>, or <> field to +collect metrics for. `unsigned_long` fields are not supported. + -WARNING: Do not use the same fields in `histogram` and `metrics`. If you specify -the same field in both `histogram` and `metrics`, the rollup attempt will fail. +WARNING: Do not use fields specified in `histogram` or `date_histogram`. If you +do, the rollup attempt will fail. `metrics`:: (Required, string or array of strings) @@ -186,8 +199,9 @@ Metrics to collect. Each value corresponds to a <>, <>, <>, and -<>. You must -specify at least one value. +<>. <> and <> +fields only support the `max`, `min`, and `value_count` metrics. You must specify +at least one value. + NOTE: The rollup index stores these metrics in an <> field. The `avg` metric