diff --git a/_aggregations/metric/percentile-ranks.md b/_aggregations/metric/percentile-ranks.md index 124192ecdd..f20767f20a 100644 --- a/_aggregations/metric/percentile-ranks.md +++ b/_aggregations/metric/percentile-ranks.md @@ -22,7 +22,7 @@ The `percentile_ranks` aggregation takes the following parameters. | `field` | String | Required | The numeric field used to compute percentile ranks. | | `values` | Array of doubles | Required | The values used to calculate percentile ranks. | | `keyed` | Boolean | Optional | If set to `false`, returns results as an array. Otherwise returns results as a JSON object. Default is `true`. | -| `tdigest.compression` | Double | Optional | Controls accuracy and memory usage of the `tdigest` algorithm. See [Precision tuning with tdigest](#precision-tuning-with-tdigest). | +| `tdigest.compression` | Double | Optional | Controls accuracy and memory usage of the `tdigest` algorithm. See [Precision tuning with tdigest](#precision-tuning-with-tdigest). Default is `200`. | | `hdr.number_of_significant_value_digits` | Integer | Optional | The precision setting for the HDR histogram. See [HDR histogram](#hdr-histogram). | | `missing` | Number | Optional | The default value used when the target field is missing in a document. | | `script` | Object | Optional | The script used to compute custom values instead of using a field. Supports inline and stored scripts. | @@ -165,9 +165,9 @@ The response includes an array instead of an object: ## Precision tuning with tdigest -By default, percentile ranks are calculated using the `tdigest` algorithm. You can control the trade-off between accuracy and memory usage by specifying the `tdigest.compression` parameter. Higher values provide better accuracy but require more memory. For more information about how tdigest works, see [Precision tuning with tdigest]({{site.url}}{{site.baseurl}}/aggregations/metric/percentile/#precision-tuning-with-tdigest). +By default, percentile ranks are calculated using the `tdigest` algorithm. You can control the trade-off between accuracy and memory usage by specifying the `tdigest.compression` parameter. Higher values provide better accuracy but require more memory. Default is `200`. For more information about how tdigest works, see [Precision tuning with tdigest]({{site.url}}{{site.baseurl}}/aggregations/metric/percentile/#precision-tuning-with-tdigest). -The following example is configured with `tdigest.compression` set to `200`: +The following example is configured with `tdigest.compression` set to `300`: ```json GET /transaction_data/_search @@ -179,7 +179,7 @@ GET /transaction_data/_search "field": "amount", "values": [25, 55], "tdigest": { - "compression": 200 + "compression": 300 } } } diff --git a/_aggregations/metric/percentile.md b/_aggregations/metric/percentile.md index e9d0d0b3cb..bba225b9f7 100644 --- a/_aggregations/metric/percentile.md +++ b/_aggregations/metric/percentile.md @@ -24,7 +24,7 @@ The `percentiles` aggregation takes the following parameters. | `field` | String | Required | The numeric field used to compute percentiles. | | `percents` | Array of doubles | Optional | The list of percentiles returned in the response. Default is `[1, 5, 25, 50, 75, 95, 99]`. | | `keyed` | Boolean | Optional | If set to `false`, returns results as an array. Otherwise, returns results as a JSON object. Default is `true`. | -| `tdigest.compression` | Double | Optional | Controls accuracy and memory usage of the `tdigest` algorithm. See [Precision tuning with tdigest](#precision-tuning-with-tdigest). | +| `tdigest.compression` | Double | Optional | Controls accuracy and memory usage of the `tdigest` algorithm. See [Precision tuning with tdigest](#precision-tuning-with-tdigest). Default is `200`. | | `hdr.number_of_significant_value_digits` | Integer | Optional | The precision setting for the HDR histogram. See [HDR histogram](#hdr-histogram). | | `missing` | Number | Optional | The default value used when the target field is missing in a document. | | `script` | Object | Optional | The script used to compute custom values instead of using a field. Supports inline and stored scripts. | @@ -218,7 +218,7 @@ Unlike exact percentile calculations, `tdigest` uses a probabilistic approach th The algorithm is designed to be highly accurate near the tails of the distribution---the low percentiles (such as 1st) and high percentiles (such as 99th)---which are often the most important for performance analysis. You can control the precision of the results using the `compression` parameter. -A higher `compression` value means that more centroids are used, which increases accuracy (especially in the tails) but requires more memory and CPU. A lower `compression` value reduces memory usage and speeds up execution, but the results may be less accurate. +A higher `compression` value means that more centroids are used, which increases accuracy (especially in the tails) but requires more memory and CPU. A lower `compression` value reduces memory usage and speeds up execution, but the results may be less accurate. Default is `200`. Lower `compression` values such as `100` may perform especially poorly on low-cardinality data, such as HTTP status codes. Use `tdigest` when: @@ -231,7 +231,7 @@ Avoid `tdigest` when: * You are working only with integer data and want maximum speed. * You care less about accuracy in the distribution tails and prefer faster aggregation (consider using [`hdr`](#hdr-histogram) instead). - The following example sets `tdigest.compression` to `200`: + The following example sets `tdigest.compression` to `300`: ```json GET /latency_data/_search @@ -242,7 +242,7 @@ GET /latency_data/_search "percentiles": { "field": "load_time", "tdigest": { - "compression": 200 + "compression": 300 } } }