From 2d9ee5ddfec5a495bda02a7f1b858ca6f122c650 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Thu, 12 Dec 2019 08:38:48 -0500 Subject: [PATCH] [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. --- .../metrics/percentile-rank-aggregation.asciidoc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/reference/aggregations/metrics/percentile-rank-aggregation.asciidoc b/docs/reference/aggregations/metrics/percentile-rank-aggregation.asciidoc index d0765ea026846..71bc5ceee555d 100644 --- a/docs/reference/aggregations/metrics/percentile-rank-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/percentile-rank-aggregation.asciidoc @@ -51,14 +51,16 @@ The response will look like this: "aggregations": { "load_time_ranks": { "values" : { - "500.0": 55.00000000000001, - "600.0": 64.0 + "500.0": 90.01, + "600.0": 100.0 } } } } -------------------------------------------------- // TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/] +// TESTRESPONSE[s/"500.0": 90.01/"500.0": 55.00000000000001/] +// TESTRESPONSE[s/"600.0": 100.0/"600.0": 64.0/] From this information you can determine you are hitting the 99% load time target but not quite hitting the 95% load time target @@ -97,11 +99,11 @@ Response: "values": [ { "key": 500.0, - "value": 55.00000000000001 + "value": 90.01 }, { "key": 600.0, - "value": 64.0 + "value": 100.0 } ] } @@ -109,6 +111,8 @@ Response: } -------------------------------------------------- // TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/] +// TESTRESPONSE[s/"value": 90.01/"value": 55.00000000000001/] +// TESTRESPONSE[s/"value": 100.0/"value": 64.0/] ==== Script