Browse Source

[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.
James Rodewig 5 years ago
parent
commit
2d9ee5ddfe

+ 8 - 4
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