Skip to content

Commit 3d9f765

Browse files
committed
[DOCS] Correct percentile rank agg example response (#50052)
The example snippets in the percentile rank agg docs use a test dataset named `latency`, which is generated from docs/gradle.build. At some point the dataset and example snippets were updated, but the text surrounding the snippets was not. This means the text and the example snippets shown no longer match up. This corrects that by changing the snippets using /TESTRESPONSE magic comments.
1 parent 8744367 commit 3d9f765

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,16 @@ The response will look like this:
5151
"aggregations": {
5252
"load_time_ranks": {
5353
"values" : {
54-
"500.0": 55.00000000000001,
55-
"600.0": 64.0
54+
"500.0": 90.01,
55+
"600.0": 100.0
5656
}
5757
}
5858
}
5959
}
6060
--------------------------------------------------
6161
// TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
62+
// TESTRESPONSE[s/"500.0": 90.01/"500.0": 55.00000000000001/]
63+
// TESTRESPONSE[s/"600.0": 100.0/"600.0": 64.0/]
6264

6365
From this information you can determine you are hitting the 99% load time target but not quite
6466
hitting the 95% load time target
@@ -98,18 +100,20 @@ Response:
98100
"values": [
99101
{
100102
"key": 500.0,
101-
"value": 55.00000000000001
103+
"value": 90.01
102104
},
103105
{
104106
"key": 600.0,
105-
"value": 64.0
107+
"value": 100.0
106108
}
107109
]
108110
}
109111
}
110112
}
111113
--------------------------------------------------
112114
// TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
115+
// TESTRESPONSE[s/"value": 90.01/"value": 55.00000000000001/]
116+
// TESTRESPONSE[s/"value": 100.0/"value": 64.0/]
113117

114118

115119
==== Script

0 commit comments

Comments
 (0)