Skip to content

Commit 90f439f

Browse files
committed
[DOCS] fix documentation for selecting algorithm for percentiles agg
1 parent 414c62e commit 90f439f

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

docs/reference/aggregations/metrics/percentile-aggregation.asciidoc

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ This balance can be controlled using a `compression` parameter:
189189
"load_time_outlier" : {
190190
"percentiles" : {
191191
"field" : "load_time",
192-
"compression" : 200 <1>
192+
"tdigest": {
193+
"compression" : 200 <1>
194+
}
193195
}
194196
}
195197
}
@@ -217,11 +219,11 @@ the TDigest will use less memory.
217219

218220
experimental[]
219221

220-
https://github.com/HdrHistogram/HdrHistogram[HDR Histogram] (High Dynamic Range Histogram) is an alternative implementation
221-
that can be useful when calculating percentiles for latency measurements as it can be faster than the t-digest implementation
222-
with the trade-off of a larger memory footprint. This implementation maintains a fixed worse-case percentage error (specified
223-
as a number of significant digits). This means that if data is recorded with values from 1 microsecond up to 1 hour
224-
(3,600,000,000 microseconds) in a histogram set to 3 significant digits, it will maintain a value resolution of 1 microsecond
222+
https://github.com/HdrHistogram/HdrHistogram[HDR Histogram] (High Dynamic Range Histogram) is an alternative implementation
223+
that can be useful when calculating percentiles for latency measurements as it can be faster than the t-digest implementation
224+
with the trade-off of a larger memory footprint. This implementation maintains a fixed worse-case percentage error (specified
225+
as a number of significant digits). This means that if data is recorded with values from 1 microsecond up to 1 hour
226+
(3,600,000,000 microseconds) in a histogram set to 3 significant digits, it will maintain a value resolution of 1 microsecond
225227
for values up to 1 millisecond and 3.6 seconds (or better) for the maximum tracked value (1 hour).
226228

227229
The HDR Histogram can be used by specifying the `method` parameter in the request:
@@ -234,17 +236,18 @@ The HDR Histogram can be used by specifying the `method` parameter in the reques
234236
"percentiles" : {
235237
"field" : "load_time",
236238
"percents" : [95, 99, 99.9],
237-
"method" : "hdr", <1>
238-
"number_of_significant_value_digits" : 3 <2>
239+
"hdr": { <1>
240+
"number_of_significant_value_digits" : 3 <2>
241+
}
239242
}
240243
}
241244
}
242245
}
243246
--------------------------------------------------
244-
<1> The `method` parameter is set to `hdr` to indicate that HDR Histogram should be used to calculate the percentiles
247+
<1> `hdr` object indicates that HDR Histogram should be used to calculate the percentiles and specific settings for this algorithm can be specified inside the object
245248
<2> `number_of_significant_value_digits` specifies the resolution of values for the histogram in number of significant digits
246249

247-
The HDRHistogram only supports positive values and will error if it is passed a negative value. It is also not a good idea to use
250+
The HDRHistogram only supports positive values and will error if it is passed a negative value. It is also not a good idea to use
248251
the HDRHistogram if the range of values is unknown as this could lead to high memory usage.
249252

250253
==== Missing value

docs/reference/aggregations/metrics/percentile-rank-aggregation.asciidoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ TIP: for indexed scripts replace the `file` parameter with an `id` parameter.
114114

115115
experimental[]
116116

117-
https://github.com/HdrHistogram/HdrHistogram[HDR Histogram] (High Dynamic Range Histogram) is an alternative implementation
118-
that can be useful when calculating percentile ranks for latency measurements as it can be faster than the t-digest implementation
119-
with the trade-off of a larger memory footprint. This implementation maintains a fixed worse-case percentage error (specified as a
120-
number of significant digits). This means that if data is recorded with values from 1 microsecond up to 1 hour (3,600,000,000
121-
microseconds) in a histogram set to 3 significant digits, it will maintain a value resolution of 1 microsecond for values up to
117+
https://github.com/HdrHistogram/HdrHistogram[HDR Histogram] (High Dynamic Range Histogram) is an alternative implementation
118+
that can be useful when calculating percentile ranks for latency measurements as it can be faster than the t-digest implementation
119+
with the trade-off of a larger memory footprint. This implementation maintains a fixed worse-case percentage error (specified as a
120+
number of significant digits). This means that if data is recorded with values from 1 microsecond up to 1 hour (3,600,000,000
121+
microseconds) in a histogram set to 3 significant digits, it will maintain a value resolution of 1 microsecond for values up to
122122
1 millisecond and 3.6 seconds (or better) for the maximum tracked value (1 hour).
123123

124124
The HDR Histogram can be used by specifying the `method` parameter in the request:
@@ -131,17 +131,18 @@ The HDR Histogram can be used by specifying the `method` parameter in the reques
131131
"percentile_ranks" : {
132132
"field" : "load_time",
133133
"values" : [15, 30],
134-
"method" : "hdr", <1>
135-
"number_of_significant_value_digits" : 3 <2>
134+
"hdr": { <1>
135+
"number_of_significant_value_digits" : 3 <2>
136+
}
136137
}
137138
}
138139
}
139140
}
140141
--------------------------------------------------
141-
<1> The `method` parameter is set to `hdr` to indicate that HDR Histogram should be used to calculate the percentile_ranks
142+
<1> `hdr` object indicates that HDR Histogram should be used to calculate the percentiles and specific settings for this algorithm can be specified inside the object
142143
<2> `number_of_significant_value_digits` specifies the resolution of values for the histogram in number of significant digits
143144

144-
The HDRHistogram only supports positive values and will error if it is passed a negative value. It is also not a good idea to use
145+
The HDRHistogram only supports positive values and will error if it is passed a negative value. It is also not a good idea to use
145146
the HDRHistogram if the range of values is unknown as this could lead to high memory usage.
146147

147148
==== Missing value
@@ -165,4 +166,3 @@ had a value.
165166
--------------------------------------------------
166167

167168
<1> Documents without a value in the `grade` field will fall into the same bucket as documents that have the value `10`.
168-

0 commit comments

Comments
 (0)