From e43be90e6c2e859b820a6949fab217a2338e90ae Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Fri, 6 Sep 2019 14:05:36 -0400 Subject: [PATCH] [DOCS] [5 of 5] Change // TESTRESPONSE comments to [source,console-results] (#46449) --- .../painless-guide/painless-debugging.asciidoc | 4 ++-- docs/plugins/ingest-attachment.asciidoc | 9 +++++---- .../administering/backup-cluster-config.asciidoc | 4 +--- .../bucket/adjacency-matrix-aggregation.asciidoc | 2 +- .../bucket/autodatehistogram-aggregation.asciidoc | 6 +++--- .../bucket/children-aggregation.asciidoc | 2 +- .../bucket/composite-aggregation.asciidoc | 4 ++-- .../bucket/datehistogram-aggregation.asciidoc | 12 ++++++------ .../bucket/daterange-aggregation.asciidoc | 6 +++--- .../diversified-sampler-aggregation.asciidoc | 4 ++-- .../bucket/filter-aggregation.asciidoc | 2 +- .../bucket/filters-aggregation.asciidoc | 6 +++--- .../bucket/geodistance-aggregation.asciidoc | 6 +++--- .../bucket/geohashgrid-aggregation.asciidoc | 4 ++-- .../bucket/geotilegrid-aggregation.asciidoc | 4 ++-- .../bucket/global-aggregation.asciidoc | 2 +- .../bucket/histogram-aggregation.asciidoc | 6 +++--- .../bucket/iprange-aggregation.asciidoc | 8 ++++---- .../bucket/missing-aggregation.asciidoc | 2 +- .../bucket/nested-aggregation.asciidoc | 2 +- .../bucket/parent-aggregation.asciidoc | 2 +- .../aggregations/bucket/range-aggregation.asciidoc | 8 ++++---- .../bucket/rare-terms-aggregation.asciidoc | 4 ++-- .../bucket/reverse-nested-aggregation.asciidoc | 2 +- .../bucket/sampler-aggregation.asciidoc | 4 ++-- .../bucket/significantterms-aggregation.asciidoc | 2 +- .../bucket/significanttext-aggregation.asciidoc | 2 +- .../aggregations/bucket/terms-aggregation.asciidoc | 7 ++++--- .../aggregations/matrix/stats-aggregation.asciidoc | 2 +- .../aggregations/metrics/avg-aggregation.asciidoc | 2 +- .../metrics/cardinality-aggregation.asciidoc | 2 +- .../metrics/extendedstats-aggregation.asciidoc | 2 +- .../metrics/geobounds-aggregation.asciidoc | 2 +- .../metrics/geocentroid-aggregation.asciidoc | 4 ++-- .../aggregations/metrics/max-aggregation.asciidoc | 2 +- .../median-absolute-deviation-aggregation.asciidoc | 2 +- .../aggregations/metrics/min-aggregation.asciidoc | 2 +- .../metrics/percentile-aggregation.asciidoc | 4 ++-- .../metrics/percentile-rank-aggregation.asciidoc | 4 ++-- .../metrics/scripted-metric-aggregation.asciidoc | 4 ++-- .../metrics/stats-aggregation.asciidoc | 2 +- .../aggregations/metrics/sum-aggregation.asciidoc | 2 +- .../metrics/tophits-aggregation.asciidoc | 5 +++-- .../metrics/valuecount-aggregation.asciidoc | 2 +- .../metrics/weighted-avg-aggregation.asciidoc | 4 ++-- docs/reference/aggregations/misc.asciidoc | 4 ++-- .../pipeline/avg-bucket-aggregation.asciidoc | 2 +- .../pipeline/bucket-script-aggregation.asciidoc | 2 +- .../pipeline/bucket-selector-aggregation.asciidoc | 3 ++- .../pipeline/bucket-sort-aggregation.asciidoc | 4 ++-- .../cumulative-cardinality-aggregation.asciidoc | 4 ++-- .../pipeline/cumulative-sum-aggregation.asciidoc | 2 +- .../pipeline/derivative-aggregation.asciidoc | 7 ++++--- .../extended-stats-bucket-aggregation.asciidoc | 2 +- .../pipeline/max-bucket-aggregation.asciidoc | 2 +- .../pipeline/min-bucket-aggregation.asciidoc | 2 +- .../pipeline/movfn-aggregation.asciidoc | 2 +- .../percentiles-bucket-aggregation.asciidoc | 2 +- .../pipeline/stats-bucket-aggregation.asciidoc | 2 +- .../pipeline/sum-bucket-aggregation.asciidoc | 2 +- .../pattern-replace-charfilter.asciidoc | 3 ++- .../tokenizers/edgengram-tokenizer.asciidoc | 2 +- docs/reference/api-conventions.asciidoc | 8 ++++---- .../ccr/apis/follow/get-follow-stats.asciidoc | 2 +- .../ccr/apis/follow/post-forget-follower.asciidoc | 4 ++-- docs/reference/ccr/apis/get-ccr-stats.asciidoc | 2 +- docs/reference/cluster/allocation-explain.asciidoc | 2 +- docs/reference/cluster/health.asciidoc | 2 +- docs/reference/cluster/nodes-info.asciidoc | 4 ++-- .../cluster/nodes-reload-secure-settings.asciidoc | 2 +- docs/reference/cluster/nodes-usage.asciidoc | 2 +- docs/reference/cluster/update-settings.asciidoc | 4 ++-- .../data-frames/apis/update-transform.asciidoc | 3 ++- docs/reference/docs/bulk.asciidoc | 2 +- docs/reference/docs/concurrency-control.asciidoc | 4 ++-- docs/reference/docs/delete-by-query.asciidoc | 4 ++-- docs/reference/docs/delete.asciidoc | 2 +- docs/reference/docs/index_.asciidoc | 4 ++-- docs/reference/docs/multi-get.asciidoc | 2 +- docs/reference/docs/reindex.asciidoc | 6 +++--- docs/reference/docs/termvectors.asciidoc | 4 ++-- docs/reference/docs/update-by-query.asciidoc | 4 ++-- docs/reference/getting-started.asciidoc | 8 ++++---- docs/reference/how-to/recipes/stemming.asciidoc | 6 +++--- docs/reference/ilm/apis/slm-api.asciidoc | 12 +++++++----- docs/reference/ilm/getting-started-slm.asciidoc | 3 ++- .../reference/index-modules/index-sorting.asciidoc | 2 +- docs/reference/index-modules/similarity.asciidoc | 4 ++-- .../indices/apis/reload-analyzers.asciidoc | 2 +- docs/reference/indices/flush.asciidoc | 4 ++-- docs/reference/indices/recovery.asciidoc | 5 +++-- docs/reference/indices/shard-stores.asciidoc | 2 +- docs/reference/indices/templates.asciidoc | 2 +- docs/reference/ingest.asciidoc | 3 ++- .../ingest/apis/simulate-pipeline.asciidoc | 4 ++-- docs/reference/ingest/ingest-node.asciidoc | 6 +++--- docs/reference/ingest/processors/circle.asciidoc | 4 ++-- .../ingest/processors/date-index-name.asciidoc | 4 ++-- docs/reference/ingest/processors/geoip.asciidoc | 8 ++++---- docs/reference/ingest/processors/grok.asciidoc | 4 ++-- docs/reference/ingest/processors/pipeline.asciidoc | 2 +- docs/reference/ingest/processors/script.asciidoc | 2 +- docs/reference/ingest/processors/set.asciidoc | 3 ++- .../ingest/processors/user-agent.asciidoc | 2 +- docs/reference/licensing/get-basic-status.asciidoc | 3 ++- docs/reference/licensing/get-license.asciidoc | 2 +- docs/reference/licensing/get-trial-status.asciidoc | 3 ++- docs/reference/mapping/params/normalizer.asciidoc | 4 ++-- docs/reference/mapping/types/parent-join.asciidoc | 2 +- docs/reference/mapping/types/percolator.asciidoc | 6 +++--- docs/reference/mapping/types/range.asciidoc | 7 +++---- .../mapping/types/search-as-you-type.asciidoc | 2 +- .../apis/delete-forecast.asciidoc | 1 + .../ml/anomaly-detection/apis/delete-job.asciidoc | 3 ++- .../apis/find-file-structure.asciidoc | 2 +- .../ml/anomaly-detection/apis/flush-job.asciidoc | 3 ++- .../apis/get-calendar-event.asciidoc | 2 +- .../apis/get-datafeed-stats.asciidoc | 3 ++- .../anomaly-detection/apis/get-datafeed.asciidoc | 3 ++- .../ml/anomaly-detection/apis/get-job.asciidoc | 3 ++- .../ml/anomaly-detection/apis/get-ml-info.asciidoc | 3 ++- .../anomaly-detection/apis/put-datafeed.asciidoc | 3 ++- .../ml/anomaly-detection/apis/put-job.asciidoc | 3 ++- .../apis/update-datafeed.asciidoc | 2 +- .../ml/anomaly-detection/apis/update-job.asciidoc | 2 +- .../ml/anomaly-detection/categories.asciidoc | 12 ++++++------ .../ml/anomaly-detection/customurl.asciidoc | 3 +-- .../ml/anomaly-detection/populations.asciidoc | 4 ++-- .../ml/df-analytics/apis/put-dfanalytics.asciidoc | 2 +- .../modules/cross-cluster-search.asciidoc | 4 ++-- docs/reference/query-dsl/percolate-query.asciidoc | 10 +++++----- .../query-dsl/span-containing-query.asciidoc | 3 +-- docs/reference/query-dsl/term-query.asciidoc | 2 +- docs/reference/query-dsl/terms-query.asciidoc | 2 +- docs/reference/rest-api/info.asciidoc | 3 ++- docs/reference/rollup/apis/rollup-search.asciidoc | 8 ++++---- .../rollup/rollup-getting-started.asciidoc | 4 ++-- .../rollup/rollup-search-limitations.asciidoc | 2 +- docs/reference/search/count.asciidoc | 3 +-- docs/reference/search/profile.asciidoc | 14 +++++++------- docs/reference/search/request-body.asciidoc | 4 ++-- .../reference/search/request/highlighting.asciidoc | 4 ++-- docs/reference/search/request/inner-hits.asciidoc | 8 ++++---- .../search/request/track-total-hits.asciidoc | 6 +++--- docs/reference/search/search-shards.asciidoc | 4 ++-- docs/reference/search/suggesters.asciidoc | 2 +- .../search/suggesters/completion-suggest.asciidoc | 4 ++-- docs/reference/search/suggesters/misc.asciidoc | 2 +- .../search/suggesters/phrase-suggest.asciidoc | 2 +- docs/reference/search/uri-request.asciidoc | 2 +- docs/reference/search/validate.asciidoc | 2 +- docs/reference/setup/logging-config.asciidoc | 1 + docs/reference/sql/endpoints/rest.asciidoc | 8 ++++---- x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc | 8 ++++---- .../en/rest-api/watcher/activate-watch.asciidoc | 4 ++-- .../en/rest-api/watcher/deactivate-watch.asciidoc | 4 ++-- .../en/rest-api/watcher/execute-watch.asciidoc | 2 +- x-pack/docs/en/rest-api/watcher/get-watch.asciidoc | 3 ++- 158 files changed, 304 insertions(+), 283 deletions(-) diff --git a/docs/painless/painless-guide/painless-debugging.asciidoc b/docs/painless/painless-guide/painless-debugging.asciidoc index e335bfe74ebd7..fe56cb25f1e55 100644 --- a/docs/painless/painless-guide/painless-debugging.asciidoc +++ b/docs/painless/painless-guide/painless-debugging.asciidoc @@ -38,7 +38,7 @@ POST /hockey/_explain/1 Which shows that the class of `doc.first` is `org.elasticsearch.index.fielddata.ScriptDocValues.Longs` by responding with: -[source,js] +[source,console-result] --------------------------------------------------------- { "error": { @@ -68,7 +68,7 @@ POST /hockey/_update/1 The response looks like: -[source,js] +[source,console-result] --------------------------------------------------------- { "error" : { diff --git a/docs/plugins/ingest-attachment.asciidoc b/docs/plugins/ingest-attachment.asciidoc index a3d716ff2d9eb..d0c2eba0f65e9 100644 --- a/docs/plugins/ingest-attachment.asciidoc +++ b/docs/plugins/ingest-attachment.asciidoc @@ -55,7 +55,7 @@ GET my_index/_doc/my_id Returns this: -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -140,7 +140,7 @@ GET my_index/_doc/my_id Returns this: -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -190,7 +190,7 @@ GET my_index/_doc/my_id_2 Returns this: -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -284,7 +284,8 @@ GET my_index/_doc/my_id // CONSOLE Returns this: -[source,js] + +[source,console-result] -------------------------------------------------- { "_index" : "my_index", diff --git a/docs/reference/administering/backup-cluster-config.asciidoc b/docs/reference/administering/backup-cluster-config.asciidoc index 373ff48618de8..109227e815477 100644 --- a/docs/reference/administering/backup-cluster-config.asciidoc +++ b/docs/reference/administering/backup-cluster-config.asciidoc @@ -37,12 +37,10 @@ parameter for the snapshot API. Alternatively, you can extract these configuration values in text format by using the <>: -[source,js] +[source,console] -------------------------------------------------- GET _cluster/settings?pretty&flat_settings&filter_path=persistent -------------------------------------------------- -//CONSOLE -//TEST You can store the output of this as a file together with the rest of configuration files. diff --git a/docs/reference/aggregations/bucket/adjacency-matrix-aggregation.asciidoc b/docs/reference/aggregations/bucket/adjacency-matrix-aggregation.asciidoc index 8ed900a24fa00..cd5cc3d20eb14 100644 --- a/docs/reference/aggregations/bucket/adjacency-matrix-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/adjacency-matrix-aggregation.asciidoc @@ -62,7 +62,7 @@ of groups that have recorded interactions. Response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 9, diff --git a/docs/reference/aggregations/bucket/autodatehistogram-aggregation.asciidoc b/docs/reference/aggregations/bucket/autodatehistogram-aggregation.asciidoc index 575a3e75894c0..8da1000dc2d47 100644 --- a/docs/reference/aggregations/bucket/autodatehistogram-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/autodatehistogram-aggregation.asciidoc @@ -57,7 +57,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -150,7 +150,7 @@ GET my_index/_search?size=0 UTC is used if no time zone is specified, three 1-hour buckets are returned starting at midnight UTC on 1 October 2015: -[source,js] +[source,console-result] --------------------------------- { ... @@ -205,7 +205,7 @@ Now three 1-hour buckets are still returned but the first bucket starts at 11:00pm on 30 September 2015 since that is the local time for the bucket in the specified time zone. -[source,js] +[source,console-result] --------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/children-aggregation.asciidoc b/docs/reference/aggregations/bucket/children-aggregation.asciidoc index 67d75c39448bf..778e3e6e3a613 100644 --- a/docs/reference/aggregations/bucket/children-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/children-aggregation.asciidoc @@ -125,7 +125,7 @@ The above example returns the top question tags and per tag the top answer owner Possible response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 25, diff --git a/docs/reference/aggregations/bucket/composite-aggregation.asciidoc b/docs/reference/aggregations/bucket/composite-aggregation.asciidoc index 2c50c844940fa..337cdf8a19672 100644 --- a/docs/reference/aggregations/bucket/composite-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/composite-aggregation.asciidoc @@ -422,7 +422,7 @@ GET /_search \... returns: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -520,7 +520,7 @@ GET /_search \... returns: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/datehistogram-aggregation.asciidoc b/docs/reference/aggregations/bucket/datehistogram-aggregation.asciidoc index b5633cecd0263..70ff27b184b3f 100644 --- a/docs/reference/aggregations/bucket/datehistogram-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/datehistogram-aggregation.asciidoc @@ -307,7 +307,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -377,7 +377,7 @@ If you don't specify a timezone, UTC is used. This would result in both of these documents being placed into the same day bucket, which starts at midnight UTC on 1 October 2015: -[source,js] +[source,console-result] --------------------------------- { ... @@ -419,7 +419,7 @@ GET my_index/_search?size=0 Now the first document falls into the bucket for 30 September 2015, while the second document falls into the bucket for 1 October 2015: -[source,js] +[source,console-result] --------------------------------- { ... @@ -496,7 +496,7 @@ GET my_index/_search?size=0 Instead of a single bucket starting at midnight, the above request groups the documents into buckets starting at 6am: -[source,js] +[source,console-result] ----------------------------- { ... @@ -548,7 +548,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -650,7 +650,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/daterange-aggregation.asciidoc b/docs/reference/aggregations/bucket/daterange-aggregation.asciidoc index c116bfcc785a4..9a729c90f2692 100644 --- a/docs/reference/aggregations/bucket/daterange-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/daterange-aggregation.asciidoc @@ -41,7 +41,7 @@ documents dated since 10 months ago Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -317,7 +317,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -366,7 +366,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/diversified-sampler-aggregation.asciidoc b/docs/reference/aggregations/bucket/diversified-sampler-aggregation.asciidoc index 7c825eebc6461..4221601434bf2 100644 --- a/docs/reference/aggregations/bucket/diversified-sampler-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/diversified-sampler-aggregation.asciidoc @@ -57,7 +57,7 @@ POST /stackoverflow/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -126,7 +126,7 @@ POST /stackoverflow/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/filter-aggregation.asciidoc b/docs/reference/aggregations/bucket/filter-aggregation.asciidoc index d65b1851a947f..e76b1390f6304 100644 --- a/docs/reference/aggregations/bucket/filter-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/filter-aggregation.asciidoc @@ -25,7 +25,7 @@ In the above example, we calculate the average price of all the products that ar Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/filters-aggregation.asciidoc b/docs/reference/aggregations/bucket/filters-aggregation.asciidoc index 0e7b11a010c42..90716624052b0 100644 --- a/docs/reference/aggregations/bucket/filters-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/filters-aggregation.asciidoc @@ -39,7 +39,7 @@ and another for all those containing a warning. Response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 9, @@ -91,7 +91,7 @@ GET logs/_search The filtered buckets are returned in the same order as provided in the request. The response for this example would be: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 4, @@ -158,7 +158,7 @@ GET logs/_search The response would be something like the following: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 3, diff --git a/docs/reference/aggregations/bucket/geodistance-aggregation.asciidoc b/docs/reference/aggregations/bucket/geodistance-aggregation.asciidoc index 82838808a3e01..7dc38353147bf 100644 --- a/docs/reference/aggregations/bucket/geodistance-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/geodistance-aggregation.asciidoc @@ -50,7 +50,7 @@ POST /museums/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -166,7 +166,7 @@ POST /museums/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -220,7 +220,7 @@ POST /museums/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/geohashgrid-aggregation.asciidoc b/docs/reference/aggregations/bucket/geohashgrid-aggregation.asciidoc index 3c84f65492992..0b0b34c1a33bb 100644 --- a/docs/reference/aggregations/bucket/geohashgrid-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/geohashgrid-aggregation.asciidoc @@ -59,7 +59,7 @@ POST /museums/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -148,7 +148,7 @@ POST /museums/_search?size=0 -------------------------------------------------- // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/geotilegrid-aggregation.asciidoc b/docs/reference/aggregations/bucket/geotilegrid-aggregation.asciidoc index 43ca6b0176b14..2d8041eff2a77 100644 --- a/docs/reference/aggregations/bucket/geotilegrid-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/geotilegrid-aggregation.asciidoc @@ -72,7 +72,7 @@ POST /museums/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -133,7 +133,7 @@ POST /museums/_search?size=0 -------------------------------------------------- // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/global-aggregation.asciidoc b/docs/reference/aggregations/bucket/global-aggregation.asciidoc index 9a17b7755d67b..1fc3fe5e6f02c 100644 --- a/docs/reference/aggregations/bucket/global-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/global-aggregation.asciidoc @@ -41,7 +41,7 @@ all products in our catalog, not just on the "shirts"). The response for the above aggregation: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/histogram-aggregation.asciidoc b/docs/reference/aggregations/bucket/histogram-aggregation.asciidoc index 33dcecb450ade..f7e340af29bc8 100644 --- a/docs/reference/aggregations/bucket/histogram-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/histogram-aggregation.asciidoc @@ -37,7 +37,7 @@ POST /sales/_search?size=0 And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -96,7 +96,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -215,7 +215,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/iprange-aggregation.asciidoc b/docs/reference/aggregations/bucket/iprange-aggregation.asciidoc index 67578af3694de..ad48efde2f4ff 100644 --- a/docs/reference/aggregations/bucket/iprange-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/iprange-aggregation.asciidoc @@ -27,7 +27,7 @@ GET /ip_addresses/_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -76,7 +76,7 @@ GET /ip_addresses/_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -130,7 +130,7 @@ GET /ip_addresses/_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -178,7 +178,7 @@ GET /ip_addresses/_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/missing-aggregation.asciidoc b/docs/reference/aggregations/bucket/missing-aggregation.asciidoc index e37b73ed97af9..7bc1e0985b594 100644 --- a/docs/reference/aggregations/bucket/missing-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/missing-aggregation.asciidoc @@ -22,7 +22,7 @@ In the above example, we get the total number of products that do not have a pri Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/nested-aggregation.asciidoc b/docs/reference/aggregations/bucket/nested-aggregation.asciidoc index 329b937bbc35c..caa735e138c33 100644 --- a/docs/reference/aggregations/bucket/nested-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/nested-aggregation.asciidoc @@ -55,7 +55,7 @@ Then one can define any type of aggregation over these nested documents. Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/parent-aggregation.asciidoc b/docs/reference/aggregations/bucket/parent-aggregation.asciidoc index 208c643b31a0f..0bb00ccc3fb24 100644 --- a/docs/reference/aggregations/bucket/parent-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/parent-aggregation.asciidoc @@ -125,7 +125,7 @@ The above example returns the top answer owners and per owner the top question t Possible response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 9, diff --git a/docs/reference/aggregations/bucket/range-aggregation.asciidoc b/docs/reference/aggregations/bucket/range-aggregation.asciidoc index 525d8689efc8c..b8de777e37ac7 100644 --- a/docs/reference/aggregations/bucket/range-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/range-aggregation.asciidoc @@ -29,7 +29,7 @@ GET /_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -87,7 +87,7 @@ GET /_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -140,7 +140,7 @@ GET /_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -329,7 +329,7 @@ GET /_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/rare-terms-aggregation.asciidoc b/docs/reference/aggregations/bucket/rare-terms-aggregation.asciidoc index 7757883a40fe9..88500a4c887e8 100644 --- a/docs/reference/aggregations/bucket/rare-terms-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/rare-terms-aggregation.asciidoc @@ -102,7 +102,7 @@ GET /_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -141,7 +141,7 @@ GET /_search This now shows the "jazz" term which has a `doc_count` of 2": -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/reverse-nested-aggregation.asciidoc b/docs/reference/aggregations/bucket/reverse-nested-aggregation.asciidoc index 8e3b65bfe71e1..b3ad66f39a2b1 100644 --- a/docs/reference/aggregations/bucket/reverse-nested-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/reverse-nested-aggregation.asciidoc @@ -98,7 +98,7 @@ object types have been defined in the mapping Possible response snippet: -[source,js] +[source,console-result] -------------------------------------------------- { "aggregations": { diff --git a/docs/reference/aggregations/bucket/sampler-aggregation.asciidoc b/docs/reference/aggregations/bucket/sampler-aggregation.asciidoc index 4a6c7bf8c7cc5..1a1f8096b46e5 100644 --- a/docs/reference/aggregations/bucket/sampler-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/sampler-aggregation.asciidoc @@ -45,7 +45,7 @@ POST /stackoverflow/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -108,7 +108,7 @@ POST /stackoverflow/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/significantterms-aggregation.asciidoc b/docs/reference/aggregations/bucket/significantterms-aggregation.asciidoc index 11e0c28323bbc..3c9eb2ebe2f9c 100644 --- a/docs/reference/aggregations/bucket/significantterms-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/significantterms-aggregation.asciidoc @@ -144,7 +144,7 @@ GET /_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/bucket/significanttext-aggregation.asciidoc b/docs/reference/aggregations/bucket/significanttext-aggregation.asciidoc index 95655f60ccbee..c6a9c97fa8e14 100644 --- a/docs/reference/aggregations/bucket/significanttext-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/significanttext-aggregation.asciidoc @@ -58,7 +58,7 @@ GET news/_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 9, diff --git a/docs/reference/aggregations/bucket/terms-aggregation.asciidoc b/docs/reference/aggregations/bucket/terms-aggregation.asciidoc index 763a7074ee718..ae894f84ec3b5 100644 --- a/docs/reference/aggregations/bucket/terms-aggregation.asciidoc +++ b/docs/reference/aggregations/bucket/terms-aggregation.asciidoc @@ -71,7 +71,7 @@ GET /_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -98,6 +98,7 @@ Response: } -------------------------------------------------- // TESTRESPONSE[s/\.\.\.//] + <1> an upper bound of the error on the document counts for each term, see <> <2> when there are lots of unique terms, Elasticsearch only returns the top terms; this number is the sum of the document counts for all buckets that are not part of the response <3> the list of the top buckets, the meaning of `top` being defined by the <> @@ -229,7 +230,7 @@ terms. This is calculated as the sum of the document count from the last term re given above the value would be 46 (2 + 15 + 29). This means that in the worst case scenario a term which was not returned could have the 4th highest document count. -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -285,7 +286,7 @@ The actual document count of Product C was 54 so the document count was only act it would be off by 15. Product A, however has an error of 0 for its document count, since every shard returned it we can be confident that the count returned is accurate. -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/matrix/stats-aggregation.asciidoc b/docs/reference/aggregations/matrix/stats-aggregation.asciidoc index ea1cd8063e6d1..a7a3cb2953a2e 100644 --- a/docs/reference/aggregations/matrix/stats-aggregation.asciidoc +++ b/docs/reference/aggregations/matrix/stats-aggregation.asciidoc @@ -53,7 +53,7 @@ GET /_search The aggregation type is `matrix_stats` and the `fields` setting defines the set of fields (as an array) for computing the statistics. The above request returns the following response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/avg-aggregation.asciidoc b/docs/reference/aggregations/metrics/avg-aggregation.asciidoc index ca7328859c970..5b7b6f618021a 100644 --- a/docs/reference/aggregations/metrics/avg-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/avg-aggregation.asciidoc @@ -19,7 +19,7 @@ POST /exams/_search?size=0 The above aggregation computes the average grade over all documents. The aggregation type is `avg` and the `field` setting defines the numeric field of the documents the average will be computed on. The above will return the following: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/cardinality-aggregation.asciidoc b/docs/reference/aggregations/metrics/cardinality-aggregation.asciidoc index 534c69e704d96..6c33e93957e29 100644 --- a/docs/reference/aggregations/metrics/cardinality-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/cardinality-aggregation.asciidoc @@ -24,7 +24,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/extendedstats-aggregation.asciidoc b/docs/reference/aggregations/metrics/extendedstats-aggregation.asciidoc index 17a313202cb0f..b420d27014e54 100644 --- a/docs/reference/aggregations/metrics/extendedstats-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/extendedstats-aggregation.asciidoc @@ -22,7 +22,7 @@ GET /exams/_search The above aggregation computes the grades statistics over all documents. The aggregation type is `extended_stats` and the `field` setting defines the numeric field of the documents the stats will be computed on. The above will return the following: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/geobounds-aggregation.asciidoc b/docs/reference/aggregations/metrics/geobounds-aggregation.asciidoc index e012ae78159fe..f705bbe0bede1 100644 --- a/docs/reference/aggregations/metrics/geobounds-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/geobounds-aggregation.asciidoc @@ -56,7 +56,7 @@ The above aggregation demonstrates how one would compute the bounding box of the The response for the above aggregation: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/geocentroid-aggregation.asciidoc b/docs/reference/aggregations/metrics/geocentroid-aggregation.asciidoc index cd9b4acfe9679..d26897c9de7e7 100644 --- a/docs/reference/aggregations/metrics/geocentroid-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/geocentroid-aggregation.asciidoc @@ -50,7 +50,7 @@ The above aggregation demonstrates how one would compute the centroid of the loc The response for the above aggregation: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -95,7 +95,7 @@ for finding the central location for museums in each city. The response for the above aggregation: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/max-aggregation.asciidoc b/docs/reference/aggregations/metrics/max-aggregation.asciidoc index 70731dbb51577..d79997d58ac99 100644 --- a/docs/reference/aggregations/metrics/max-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/max-aggregation.asciidoc @@ -25,7 +25,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/median-absolute-deviation-aggregation.asciidoc b/docs/reference/aggregations/metrics/median-absolute-deviation-aggregation.asciidoc index 336074fd2f48f..5944e78cc4fe1 100644 --- a/docs/reference/aggregations/metrics/median-absolute-deviation-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/median-absolute-deviation-aggregation.asciidoc @@ -50,7 +50,7 @@ The resulting median absolute deviation of `2` tells us that there is a fair amount of variability in the ratings. Reviewers must have diverse opinions about this product. -[source,js] +[source,console-result] --------------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/min-aggregation.asciidoc b/docs/reference/aggregations/metrics/min-aggregation.asciidoc index bc904e7403b09..daf3da4ba103a 100644 --- a/docs/reference/aggregations/metrics/min-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/min-aggregation.asciidoc @@ -25,7 +25,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/percentile-aggregation.asciidoc b/docs/reference/aggregations/metrics/percentile-aggregation.asciidoc index aafc99a6a51b8..4e5f330a35c1f 100644 --- a/docs/reference/aggregations/metrics/percentile-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/percentile-aggregation.asciidoc @@ -44,7 +44,7 @@ GET latency/_search By default, the `percentile` metric will generate a range of percentiles: `[ 1, 5, 25, 50, 75, 95, 99 ]`. The response will look like this: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -116,7 +116,7 @@ GET latency/_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/percentile-rank-aggregation.asciidoc b/docs/reference/aggregations/metrics/percentile-rank-aggregation.asciidoc index cb6624d25b2b4..1c2938eba2687 100644 --- a/docs/reference/aggregations/metrics/percentile-rank-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/percentile-rank-aggregation.asciidoc @@ -43,7 +43,7 @@ GET latency/_search The response will look like this: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -87,7 +87,7 @@ GET latency/_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc b/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc index cfded78bbdf5b..f73dec1eb8be4 100644 --- a/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/scripted-metric-aggregation.asciidoc @@ -32,7 +32,7 @@ The above aggregation demonstrates how one would use the script aggregation comp The response for the above aggregation: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 218, @@ -84,7 +84,7 @@ in a global `params` object so that it can be shared between the scripts. //// Verify this response as well but in a hidden block. -[source,js] +[source,console-result] -------------------------------------------------- { "took": 218, diff --git a/docs/reference/aggregations/metrics/stats-aggregation.asciidoc b/docs/reference/aggregations/metrics/stats-aggregation.asciidoc index 233d8139ff446..c166dc4258916 100644 --- a/docs/reference/aggregations/metrics/stats-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/stats-aggregation.asciidoc @@ -21,7 +21,7 @@ POST /exams/_search?size=0 The above aggregation computes the grades statistics over all documents. The aggregation type is `stats` and the `field` setting defines the numeric field of the documents the stats will be computed on. The above will return the following: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/sum-aggregation.asciidoc b/docs/reference/aggregations/metrics/sum-aggregation.asciidoc index eeff864e0ada7..0f843f94c40d8 100644 --- a/docs/reference/aggregations/metrics/sum-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/sum-aggregation.asciidoc @@ -26,7 +26,7 @@ POST /sales/_search?size=0 Resulting in: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/tophits-aggregation.asciidoc b/docs/reference/aggregations/metrics/tophits-aggregation.asciidoc index 1b8f224e5f012..1f43a038e7c17 100644 --- a/docs/reference/aggregations/metrics/tophits-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/tophits-aggregation.asciidoc @@ -67,7 +67,7 @@ POST /sales/_search?size=0 Possible response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -310,7 +310,7 @@ POST /sales/_search Top hits response snippet with a nested hit, which resides in the first slot of array field `comments`: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -355,6 +355,7 @@ Top hits response snippet with a nested hit, which resides in the first slot of } -------------------------------------------------- // TESTRESPONSE[s/\.\.\.//] + <1> Name of the array field containing the nested hit <2> Position if the nested hit in the containing array <3> Source of the nested hit diff --git a/docs/reference/aggregations/metrics/valuecount-aggregation.asciidoc b/docs/reference/aggregations/metrics/valuecount-aggregation.asciidoc index 1a617c36ca470..74cc0ae76447b 100644 --- a/docs/reference/aggregations/metrics/valuecount-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/valuecount-aggregation.asciidoc @@ -19,7 +19,7 @@ POST /sales/_search?size=0 Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/metrics/weighted-avg-aggregation.asciidoc b/docs/reference/aggregations/metrics/weighted-avg-aggregation.asciidoc index 16c14b9205271..01be89f479477 100644 --- a/docs/reference/aggregations/metrics/weighted-avg-aggregation.asciidoc +++ b/docs/reference/aggregations/metrics/weighted-avg-aggregation.asciidoc @@ -74,7 +74,7 @@ POST /exams/_search Which yields a response like: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -126,7 +126,7 @@ POST /exams/_search The three values (`1`, `2`, and `3`) will be included as independent values, all with the weight of `2`: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/aggregations/misc.asciidoc b/docs/reference/aggregations/misc.asciidoc index 36bb2a9afd0ce..99a19247acfc5 100644 --- a/docs/reference/aggregations/misc.asciidoc +++ b/docs/reference/aggregations/misc.asciidoc @@ -62,7 +62,7 @@ GET /twitter/_search Then that piece of metadata will be returned in place for our `titles` terms aggregation -[source,js] +[source,console-result] -------------------------------------------------- { "aggregations": { @@ -118,7 +118,7 @@ GET /twitter/_search?typed_keys In the response, the aggregations names will be changed to respectively `date_histogram#tweets_over_time` and `top_hits#top_users`, reflecting the internal types of each aggregation: -[source,js] +[source,console-result] -------------------------------------------------- { "aggregations": { diff --git a/docs/reference/aggregations/pipeline/avg-bucket-aggregation.asciidoc b/docs/reference/aggregations/pipeline/avg-bucket-aggregation.asciidoc index 12fced9c6dd22..44fbc6fe01f98 100644 --- a/docs/reference/aggregations/pipeline/avg-bucket-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/avg-bucket-aggregation.asciidoc @@ -68,7 +68,7 @@ POST /_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/aggregations/pipeline/bucket-script-aggregation.asciidoc b/docs/reference/aggregations/pipeline/bucket-script-aggregation.asciidoc index e3e6be8718d59..99617c7f788af 100644 --- a/docs/reference/aggregations/pipeline/bucket-script-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/bucket-script-aggregation.asciidoc @@ -90,7 +90,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/aggregations/pipeline/bucket-selector-aggregation.asciidoc b/docs/reference/aggregations/pipeline/bucket-selector-aggregation.asciidoc index a710901b943d4..2e16afd4a0a91 100644 --- a/docs/reference/aggregations/pipeline/bucket-selector-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/bucket-selector-aggregation.asciidoc @@ -78,7 +78,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, @@ -112,4 +112,5 @@ And the following may be the response: // TESTRESPONSE[s/"took": 11/"took": $body.took/] // TESTRESPONSE[s/"_shards": \.\.\./"_shards": $body._shards/] // TESTRESPONSE[s/"hits": \.\.\./"hits": $body.hits/] + <1> Bucket for `2015/02/01 00:00:00` has been removed as its total sales was less than 200 diff --git a/docs/reference/aggregations/pipeline/bucket-sort-aggregation.asciidoc b/docs/reference/aggregations/pipeline/bucket-sort-aggregation.asciidoc index 25d4ccef4b016..45a8498b08792 100644 --- a/docs/reference/aggregations/pipeline/bucket-sort-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/bucket-sort-aggregation.asciidoc @@ -84,7 +84,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 82, @@ -162,7 +162,7 @@ POST /sales/_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc b/docs/reference/aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc index 99dd32f85c420..01419f4b9a341 100644 --- a/docs/reference/aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/cumulative-cardinality-aggregation.asciidoc @@ -71,7 +71,7 @@ GET /user_hits/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, @@ -174,7 +174,7 @@ GET /user_hits/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/aggregations/pipeline/cumulative-sum-aggregation.asciidoc b/docs/reference/aggregations/pipeline/cumulative-sum-aggregation.asciidoc index 6cc06d65bd53c..7570063f5d7ed 100644 --- a/docs/reference/aggregations/pipeline/cumulative-sum-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/cumulative-sum-aggregation.asciidoc @@ -64,7 +64,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/aggregations/pipeline/derivative-aggregation.asciidoc b/docs/reference/aggregations/pipeline/derivative-aggregation.asciidoc index b0f2eb6cabb35..36e51c05e156f 100644 --- a/docs/reference/aggregations/pipeline/derivative-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/derivative-aggregation.asciidoc @@ -67,7 +67,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, @@ -165,7 +165,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 50, @@ -259,7 +259,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 50, @@ -309,5 +309,6 @@ And the following may be the response: // TESTRESPONSE[s/"took": 50/"took": $body.took/] // TESTRESPONSE[s/"_shards": \.\.\./"_shards": $body._shards/] // TESTRESPONSE[s/"hits": \.\.\./"hits": $body.hits/] + <1> `value` is reported in the original units of 'per month' <2> `normalized_value` is reported in the desired units of 'per day' diff --git a/docs/reference/aggregations/pipeline/extended-stats-bucket-aggregation.asciidoc b/docs/reference/aggregations/pipeline/extended-stats-bucket-aggregation.asciidoc index 6ad9f61f3a164..0ec03c99e4815 100644 --- a/docs/reference/aggregations/pipeline/extended-stats-bucket-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/extended-stats-bucket-aggregation.asciidoc @@ -69,7 +69,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/aggregations/pipeline/max-bucket-aggregation.asciidoc b/docs/reference/aggregations/pipeline/max-bucket-aggregation.asciidoc index 07f72d655792d..82c072d0eafaa 100644 --- a/docs/reference/aggregations/pipeline/max-bucket-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/max-bucket-aggregation.asciidoc @@ -67,7 +67,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/aggregations/pipeline/min-bucket-aggregation.asciidoc b/docs/reference/aggregations/pipeline/min-bucket-aggregation.asciidoc index 217c3dc0ad74f..b02b351fa665d 100644 --- a/docs/reference/aggregations/pipeline/min-bucket-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/min-bucket-aggregation.asciidoc @@ -67,7 +67,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/aggregations/pipeline/movfn-aggregation.asciidoc b/docs/reference/aggregations/pipeline/movfn-aggregation.asciidoc index 7f221d2359006..32b740cc9c967 100644 --- a/docs/reference/aggregations/pipeline/movfn-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/movfn-aggregation.asciidoc @@ -78,7 +78,7 @@ The `buckets_path` parameter is then used to "point" at one of the sibling metri An example response from the above aggregation may look like: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/aggregations/pipeline/percentiles-bucket-aggregation.asciidoc b/docs/reference/aggregations/pipeline/percentiles-bucket-aggregation.asciidoc index dd9017807d93e..c04aebdd89b70 100644 --- a/docs/reference/aggregations/pipeline/percentiles-bucket-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/percentiles-bucket-aggregation.asciidoc @@ -70,7 +70,7 @@ the `sales` aggregation in the `sales_per_month` date histogram. And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/aggregations/pipeline/stats-bucket-aggregation.asciidoc b/docs/reference/aggregations/pipeline/stats-bucket-aggregation.asciidoc index 827dc1b5559a1..596bd95dbc115 100644 --- a/docs/reference/aggregations/pipeline/stats-bucket-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/stats-bucket-aggregation.asciidoc @@ -66,7 +66,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/aggregations/pipeline/sum-bucket-aggregation.asciidoc b/docs/reference/aggregations/pipeline/sum-bucket-aggregation.asciidoc index 0c88ca406675e..1bae8bcb5251a 100644 --- a/docs/reference/aggregations/pipeline/sum-bucket-aggregation.asciidoc +++ b/docs/reference/aggregations/pipeline/sum-bucket-aggregation.asciidoc @@ -66,7 +66,7 @@ POST /sales/_search And the following may be the response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 11, diff --git a/docs/reference/analysis/charfilters/pattern-replace-charfilter.asciidoc b/docs/reference/analysis/charfilters/pattern-replace-charfilter.asciidoc index fe76d4edb06b8..a6fc0dcb39e1c 100644 --- a/docs/reference/analysis/charfilters/pattern-replace-charfilter.asciidoc +++ b/docs/reference/analysis/charfilters/pattern-replace-charfilter.asciidoc @@ -226,7 +226,7 @@ GET my_index/_search The output from the above is: -[source,js] +[source,console-result] ---------------------------- { "timed_out": false, @@ -263,4 +263,5 @@ The output from the above is: } ---------------------------- // TESTRESPONSE[s/"took".*/"took": "$body.took",/] + <1> Note the incorrect highlight. diff --git a/docs/reference/analysis/tokenizers/edgengram-tokenizer.asciidoc b/docs/reference/analysis/tokenizers/edgengram-tokenizer.asciidoc index 9d9b7f83e5e72..d0bd39c473978 100644 --- a/docs/reference/analysis/tokenizers/edgengram-tokenizer.asciidoc +++ b/docs/reference/analysis/tokenizers/edgengram-tokenizer.asciidoc @@ -284,7 +284,7 @@ GET my_index/_search ///////////////////// -[source,js] +[source,console-result] ---------------------------- { "took": $body.took, diff --git a/docs/reference/api-conventions.asciidoc b/docs/reference/api-conventions.asciidoc index 518d71fc5bcd3..f1460d6231337 100644 --- a/docs/reference/api-conventions.asciidoc +++ b/docs/reference/api-conventions.asciidoc @@ -222,7 +222,7 @@ GET /_search?q=elasticsearch&filter_path=took,hits.hits._id,hits.hits._score Responds: -[source,js] +[source,console-result] -------------------------------------------------- { "took" : 3, @@ -383,7 +383,7 @@ GET twitter/_settings?flat_settings=true Returns: -[source,js] +[source,console-result] -------------------------------------------------- { "twitter" : { @@ -414,7 +414,7 @@ GET twitter/_settings?flat_settings=false Returns: -[source,js] +[source,console-result] -------------------------------------------------- { "twitter" : { @@ -612,7 +612,7 @@ POST /twitter/_search?size=surprise_me&error_trace=true The response looks like: -[source,js] +[source,console-result] ---------------------------------------------------------------------- { "error": { diff --git a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc index 87496b24d68ab..f9683e615a68e 100644 --- a/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc +++ b/docs/reference/ccr/apis/follow/get-follow-stats.asciidoc @@ -213,7 +213,7 @@ GET /follower_index/_ccr/stats The API returns the following results: -[source,js] +[source,console-result] -------------------------------------------------- { "indices" : [ diff --git a/docs/reference/ccr/apis/follow/post-forget-follower.asciidoc b/docs/reference/ccr/apis/follow/post-forget-follower.asciidoc index 96c8349848efc..287c9045eb14a 100644 --- a/docs/reference/ccr/apis/follow/post-forget-follower.asciidoc +++ b/docs/reference/ccr/apis/follow/post-forget-follower.asciidoc @@ -52,7 +52,7 @@ POST //_ccr/forget_follower // TEST[s//leader_remote_cluster/] // TEST[skip_shard_failures] -[source,js] +[source,console-result] -------------------------------------------------- { "_shards" : { @@ -142,7 +142,7 @@ POST /leader_index/_ccr/forget_follower The API returns the following result: -[source,js] +[source,console-result] -------------------------------------------------- { "_shards" : { diff --git a/docs/reference/ccr/apis/get-ccr-stats.asciidoc b/docs/reference/ccr/apis/get-ccr-stats.asciidoc index 37625ae5b1c31..b4cf77c00f6fa 100644 --- a/docs/reference/ccr/apis/get-ccr-stats.asciidoc +++ b/docs/reference/ccr/apis/get-ccr-stats.asciidoc @@ -101,7 +101,7 @@ GET /_ccr/stats The API returns the following results: -[source,js] +[source,console-result] -------------------------------------------------- { "auto_follow_stats" : { diff --git a/docs/reference/cluster/allocation-explain.asciidoc b/docs/reference/cluster/allocation-explain.asciidoc index 752074cde3976..4101ea96af88b 100644 --- a/docs/reference/cluster/allocation-explain.asciidoc +++ b/docs/reference/cluster/allocation-explain.asciidoc @@ -119,7 +119,7 @@ GET /_cluster/allocation/explain The API returns the following response for an unassigned primary shard: -[source,js] +[source,console-result] -------------------------------------------------- { "index" : "idx", diff --git a/docs/reference/cluster/health.asciidoc b/docs/reference/cluster/health.asciidoc index d43bc51ee5e47..97d946d25ed81 100644 --- a/docs/reference/cluster/health.asciidoc +++ b/docs/reference/cluster/health.asciidoc @@ -147,7 +147,7 @@ GET _cluster/health The API returns the following response in case of a quiet single node cluster with a single index with one shard and one replica: -[source,js] +[source,console-result] -------------------------------------------------- { "cluster_name" : "testcluster", diff --git a/docs/reference/cluster/nodes-info.asciidoc b/docs/reference/cluster/nodes-info.asciidoc index 2c7a74719e048..a5a7654930d7c 100644 --- a/docs/reference/cluster/nodes-info.asciidoc +++ b/docs/reference/cluster/nodes-info.asciidoc @@ -195,7 +195,7 @@ GET /_nodes/plugins The API returns the following response: -[source,js] +[source,console-result] -------------------------------------------------- { "_nodes": ... @@ -267,7 +267,7 @@ GET /_nodes/ingest The API returns the following response: -[source,js] +[source,console-result] -------------------------------------------------- { "_nodes": ... diff --git a/docs/reference/cluster/nodes-reload-secure-settings.asciidoc b/docs/reference/cluster/nodes-reload-secure-settings.asciidoc index 68bca72be248c..b99f93dfc5319 100644 --- a/docs/reference/cluster/nodes-reload-secure-settings.asciidoc +++ b/docs/reference/cluster/nodes-reload-secure-settings.asciidoc @@ -35,7 +35,7 @@ node id. Each value has the node `name` and an optional `reload_exception` field. The `reload_exception` field is a serialization of the exception that was thrown during the reload process, if any. -[source,js] +[source,console-result] -------------------------------------------------- { "_nodes": { diff --git a/docs/reference/cluster/nodes-usage.asciidoc b/docs/reference/cluster/nodes-usage.asciidoc index 2a0b9f7b6136c..5b1559790c3be 100644 --- a/docs/reference/cluster/nodes-usage.asciidoc +++ b/docs/reference/cluster/nodes-usage.asciidoc @@ -63,7 +63,7 @@ GET _nodes/usage The API returns the following response: -[source,js] +[source,console-result] -------------------------------------------------- { "_nodes": { diff --git a/docs/reference/cluster/update-settings.asciidoc b/docs/reference/cluster/update-settings.asciidoc index e2da6c5161763..223a9c5544486 100644 --- a/docs/reference/cluster/update-settings.asciidoc +++ b/docs/reference/cluster/update-settings.asciidoc @@ -87,7 +87,7 @@ PUT /_cluster/settings?flat_settings=true The response to an update returns the changed setting, as in this response to the transient example: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -116,7 +116,7 @@ PUT /_cluster/settings The response does not include settings that have been reset: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/data-frames/apis/update-transform.asciidoc b/docs/reference/data-frames/apis/update-transform.asciidoc index dfa6f853ad810..499c25e6df238 100644 --- a/docs/reference/data-frames/apis/update-transform.asciidoc +++ b/docs/reference/data-frames/apis/update-transform.asciidoc @@ -153,7 +153,8 @@ POST _data_frame/transforms/simple-kibana-ecomm-pivot/_update // TEST[setup:simple_kibana_continuous_pivot] When the transform is updated, you receive the updated configuration: -[source,js] + +[source,console-result] ---- { "id": "simple-kibana-ecomm-pivot", diff --git a/docs/reference/docs/bulk.asciidoc b/docs/reference/docs/bulk.asciidoc index 440d2dd709318..bb83464e55a0f 100644 --- a/docs/reference/docs/bulk.asciidoc +++ b/docs/reference/docs/bulk.asciidoc @@ -84,7 +84,7 @@ POST _bulk The result of this bulk operation is: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 30, diff --git a/docs/reference/docs/concurrency-control.asciidoc b/docs/reference/docs/concurrency-control.asciidoc index 4b02239ee6ced..a7c38f6c222ea 100644 --- a/docs/reference/docs/concurrency-control.asciidoc +++ b/docs/reference/docs/concurrency-control.asciidoc @@ -33,7 +33,7 @@ PUT products/_doc/1567 You can see the assigned sequence number and primary term in the `_seq_no` and `_primary_term` fields of the response: -[source,js] +[source,console-result] -------------------------------------------------- { "_shards" : { @@ -67,7 +67,7 @@ GET products/_doc/1567 returns: -[source,js] +[source,console-result] -------------------------------------------------- { "_index" : "products", diff --git a/docs/reference/docs/delete-by-query.asciidoc b/docs/reference/docs/delete-by-query.asciidoc index c8f18f2c47962..bded6cc1812d0 100644 --- a/docs/reference/docs/delete-by-query.asciidoc +++ b/docs/reference/docs/delete-by-query.asciidoc @@ -27,7 +27,7 @@ POST /twitter/_delete_by_query //// -[source,js] +[source,console-result] -------------------------------------------------- { "took" : 147, @@ -261,7 +261,7 @@ POST /twitter/_delete_by_query The JSON response looks like this: -[source,js] +[source,console-result] -------------------------------------------------- { "took" : 147, diff --git a/docs/reference/docs/delete.asciidoc b/docs/reference/docs/delete.asciidoc index 66f2daf03354c..4d4a81e58253c 100644 --- a/docs/reference/docs/delete.asciidoc +++ b/docs/reference/docs/delete.asciidoc @@ -176,7 +176,7 @@ DELETE /twitter/_doc/1 The API returns the following result: -[source,js] +[source,console-result] -------------------------------------------------- { "_shards" : { diff --git a/docs/reference/docs/index_.asciidoc b/docs/reference/docs/index_.asciidoc index 3e70cf45dbc57..e95f2ba4b81ee 100644 --- a/docs/reference/docs/index_.asciidoc +++ b/docs/reference/docs/index_.asciidoc @@ -203,7 +203,7 @@ POST twitter/_doc/ The API returns the following result: -[source,js] +[source,console-result] -------------------------------------------------- { "_shards" : { @@ -466,7 +466,7 @@ PUT twitter/_doc/1 The API returns the following result: -[source,js] +[source,console-result] -------------------------------------------------- { "_shards" : { diff --git a/docs/reference/docs/multi-get.asciidoc b/docs/reference/docs/multi-get.asciidoc index 3360f2c06ffa4..28b76dbe42c76 100644 --- a/docs/reference/docs/multi-get.asciidoc +++ b/docs/reference/docs/multi-get.asciidoc @@ -54,7 +54,7 @@ GET /test/_mget And type: -[source,js] +[source,console] -------------------------------------------------- GET /test/_doc/_mget { diff --git a/docs/reference/docs/reindex.asciidoc b/docs/reference/docs/reindex.asciidoc index 5a25442601492..f9f33beb21029 100644 --- a/docs/reference/docs/reindex.asciidoc +++ b/docs/reference/docs/reindex.asciidoc @@ -29,7 +29,7 @@ POST _reindex That will return something like this: -[source,js] +[source,console-result] -------------------------------------------------- { "took" : 147, @@ -689,7 +689,7 @@ POST /_reindex?wait_for_completion The JSON response looks like this: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 639, @@ -956,7 +956,7 @@ GET test2/_doc/1 which will return: -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, diff --git a/docs/reference/docs/termvectors.asciidoc b/docs/reference/docs/termvectors.asciidoc index 515d75ff3bafe..a24f3ea954887 100644 --- a/docs/reference/docs/termvectors.asciidoc +++ b/docs/reference/docs/termvectors.asciidoc @@ -202,7 +202,7 @@ GET /twitter/_termvectors/1 Response: -[source,js] +[source,console-result] -------------------------------------------------- { "_id": "1", @@ -339,7 +339,7 @@ GET /twitter/_termvectors Response: -[source,js] +[source,console-result] -------------------------------------------------- { "_index": "twitter", diff --git a/docs/reference/docs/update-by-query.asciidoc b/docs/reference/docs/update-by-query.asciidoc index c519643451509..c4972fa89bb27 100644 --- a/docs/reference/docs/update-by-query.asciidoc +++ b/docs/reference/docs/update-by-query.asciidoc @@ -15,7 +15,7 @@ POST twitter/_update_by_query?conflicts=proceed That will return something like this: -[source,js] +[source,console-result] -------------------------------------------------- { "took" : 147, @@ -260,7 +260,7 @@ POST /twitter/_update_by_query?conflicts=proceed The JSON response looks like this: -[source,js] +[source,console-result] -------------------------------------------------- { "took" : 147, diff --git a/docs/reference/getting-started.asciidoc b/docs/reference/getting-started.asciidoc index 4c5b3535787b8..34dfd7dc5c0de 100755 --- a/docs/reference/getting-started.asciidoc +++ b/docs/reference/getting-started.asciidoc @@ -227,7 +227,7 @@ indexes the `name` field. Since this is a new document, the response shows that the result of the operation was that version 1 of the document was created: -[source,js] +[source,console-result] -------------------------------------------------- { "_index" : "customer", @@ -262,7 +262,7 @@ GET /customer/_doc/1 The response indicates that a document with the specified ID was found and shows the original source fields that were indexed. -[source,js] +[source,console-result] -------------------------------------------------- { "_index" : "customer", @@ -373,7 +373,7 @@ GET /bank/_search By default, the `hits` section of the response includes the first 10 documents that match the search criteria: -[source,js] +[source,console-result] -------------------------------------------------- { "took" : 63, @@ -573,7 +573,7 @@ The `buckets` in the response are the values of the `state` field. The can see that there are 27 accounts in `ID` (Idaho). Because the request set `size=0`, the response only contains the aggregation results. -[source,js] +[source,console-result] -------------------------------------------------- { "took": 29, diff --git a/docs/reference/how-to/recipes/stemming.asciidoc b/docs/reference/how-to/recipes/stemming.asciidoc index d435ce1c94d4b..f68d8c7ff87c3 100644 --- a/docs/reference/how-to/recipes/stemming.asciidoc +++ b/docs/reference/how-to/recipes/stemming.asciidoc @@ -70,7 +70,7 @@ GET index/_search // CONSOLE // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { "took": 2, @@ -131,7 +131,7 @@ GET index/_search // CONSOLE // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { "took": 1, @@ -191,7 +191,7 @@ GET index/_search // CONSOLE // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { "took": 2, diff --git a/docs/reference/ilm/apis/slm-api.asciidoc b/docs/reference/ilm/apis/slm-api.asciidoc index 7b32a3fc50903..0466924e3dee2 100644 --- a/docs/reference/ilm/apis/slm-api.asciidoc +++ b/docs/reference/ilm/apis/slm-api.asciidoc @@ -121,7 +121,7 @@ GET /_slm/policy/daily-snapshots?human The output looks similar to the following: -[source,js] +[source,console-result] -------------------------------------------------- { "daily-snapshots" : { @@ -183,7 +183,7 @@ PUT /_slm/policy/daily-snapshots/_execute This API will immediately return with the generated snapshot name -[source,js] +[source,console-result] -------------------------------------------------- { "snapshot_name": "daily-snap-2019.04.24-gwrqoo2xtea3q57vvg0uea" @@ -206,7 +206,7 @@ GET /_slm/policy/daily-snapshots?human Which, in this case shows an error because the index did not exist: -[source,js] +[source,console-result] -------------------------------------------------- { "daily-snapshots" : { @@ -235,6 +235,7 @@ Which, in this case shows an error because the index did not exist: } -------------------------------------------------- // TESTRESPONSE[skip:the presence of last_failure is asynchronous and will be present for users, but is untestable] + <1> The last unsuccessfully initiated snapshot by this policy, along with the details of its failure In this case, it failed due to the "important" index not existing and @@ -269,7 +270,7 @@ PUT /_slm/policy/daily-snapshots/_execute // CONSOLE // TEST[skip:we can't handle snapshots in docs tests] -[source,js] +[source,console-result] -------------------------------------------------- { "snapshot_name": "daily-snap-2019.04.24-tmtnyjtrsxkhbrrdcgg18a" @@ -289,7 +290,7 @@ GET /_slm/policy/daily-snapshots?human Which now includes the successful snapshot information: -[source,js] +[source,console-result] -------------------------------------------------- { "daily-snapshots" : { @@ -323,6 +324,7 @@ Which now includes the successful snapshot information: } -------------------------------------------------- // TESTRESPONSE[skip:the presence of last_failure and last_success is asynchronous and will be present for users, but is untestable] + <1> The policy's version has been incremented because it was updated <2> The last successfully initiated snapshot information diff --git a/docs/reference/ilm/getting-started-slm.asciidoc b/docs/reference/ilm/getting-started-slm.asciidoc index 5849101ffe6c3..baef2021f7796 100644 --- a/docs/reference/ilm/getting-started-slm.asciidoc +++ b/docs/reference/ilm/getting-started-slm.asciidoc @@ -158,7 +158,7 @@ This request will return a response that includes the policy, as well as information about the last time the policy succeeded and failed, as well as the next time the policy will be executed. -[source,js] +[source,console-result] -------------------------------------------------- { "nightly-snapshots" : { @@ -190,6 +190,7 @@ next time the policy will be executed. } -------------------------------------------------- // TESTRESPONSE[skip:the presence of last_failure and last_success is asynchronous and will be present for users, but is untestable] + <1> information about the last time the policy successfully initated a snapshot <2> the name of the snapshot that was successfully initiated <3> information about the last time the policy failed to initiate a snapshot diff --git a/docs/reference/index-modules/index-sorting.asciidoc b/docs/reference/index-modules/index-sorting.asciidoc index 40c4b08cb26fa..340ffa8491cfb 100644 --- a/docs/reference/index-modules/index-sorting.asciidoc +++ b/docs/reference/index-modules/index-sorting.asciidoc @@ -173,7 +173,7 @@ GET /events/_search This time, Elasticsearch will not try to count the number of documents and will be able to terminate the query as soon as N documents have been collected per segment. -[source,js] +[source,console-result] -------------------------------------------------- { "_shards": ... diff --git a/docs/reference/index-modules/similarity.asciidoc b/docs/reference/index-modules/similarity.asciidoc index 22b41901bde6d..3b03bcc94f131 100644 --- a/docs/reference/index-modules/similarity.asciidoc +++ b/docs/reference/index-modules/similarity.asciidoc @@ -238,7 +238,7 @@ GET /index/_search?explain=true Which yields: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 12, @@ -411,7 +411,7 @@ GET /index/_search?explain=true -------------------------------------------------- // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { "took": 1, diff --git a/docs/reference/indices/apis/reload-analyzers.asciidoc b/docs/reference/indices/apis/reload-analyzers.asciidoc index 1f5de4c3fb99d..6897af337a8f6 100644 --- a/docs/reference/indices/apis/reload-analyzers.asciidoc +++ b/docs/reference/indices/apis/reload-analyzers.asciidoc @@ -72,7 +72,7 @@ POST /my_index/_reload_search_analyzers The reload request returns information about the nodes it was executed on and the analyzers that were reloaded: -[source,js] +[source,console-result] -------------------------------------------------- { "_shards" : { diff --git a/docs/reference/indices/flush.asciidoc b/docs/reference/indices/flush.asciidoc index 3c36c592bd709..b8a9f43f95f06 100644 --- a/docs/reference/indices/flush.asciidoc +++ b/docs/reference/indices/flush.asciidoc @@ -96,7 +96,7 @@ GET twitter/_stats?filter_path=**.commit&level=shards <1> which returns something similar to: -[source,js] +[source,console-result] -------------------------------------------------- { "indices": { @@ -165,7 +165,7 @@ sync-flushed and information about any failure. Here is what it looks like when all shards of a two shards and one replica index successfully sync-flushed: -[source,js] +[source,console-result] -------------------------------------------------- { "_shards": { diff --git a/docs/reference/indices/recovery.asciidoc b/docs/reference/indices/recovery.asciidoc index 54d25ac2c4dab..9bebc2388f12a 100644 --- a/docs/reference/indices/recovery.asciidoc +++ b/docs/reference/indices/recovery.asciidoc @@ -67,7 +67,8 @@ GET /_recovery?human // TEST[continued] Response: -[source,js] + +[source,console-result] -------------------------------------------------- { "index1" : { @@ -159,7 +160,7 @@ GET _recovery?human&detailed=true Response: -[source,js] +[source,console-result] -------------------------------------------------- { "index1" : { diff --git a/docs/reference/indices/shard-stores.asciidoc b/docs/reference/indices/shard-stores.asciidoc index 8d4d8e3202cfa..355b23cacf7d1 100644 --- a/docs/reference/indices/shard-stores.asciidoc +++ b/docs/reference/indices/shard-stores.asciidoc @@ -45,7 +45,7 @@ Response: The shard stores information is grouped by indices and shard ids. -[source,js] +[source,console-result] -------------------------------------------------- { "indices": { diff --git a/docs/reference/indices/templates.asciidoc b/docs/reference/indices/templates.asciidoc index b2871eed2cdae..fc0cba1ce3636 100644 --- a/docs/reference/indices/templates.asciidoc +++ b/docs/reference/indices/templates.asciidoc @@ -240,7 +240,7 @@ GET /_template/template_1?filter_path=*.version The API returns the following response: -[source,js] +[source,console-result] -------------------------------------------------- { "template_1" : { diff --git a/docs/reference/ingest.asciidoc b/docs/reference/ingest.asciidoc index 135e0a571ec68..8b1cadd4d7e31 100644 --- a/docs/reference/ingest.asciidoc +++ b/docs/reference/ingest.asciidoc @@ -56,7 +56,8 @@ PUT my-index/_doc/my-id?pipeline=my_pipeline_id // TEST[continued] Response: -[source,js] + +[source,console-result] -------------------------------------------------- { "_index" : "my-index", diff --git a/docs/reference/ingest/apis/simulate-pipeline.asciidoc b/docs/reference/ingest/apis/simulate-pipeline.asciidoc index cab41ee54d16f..278b4607121f5 100644 --- a/docs/reference/ingest/apis/simulate-pipeline.asciidoc +++ b/docs/reference/ingest/apis/simulate-pipeline.asciidoc @@ -83,7 +83,7 @@ POST _ingest/pipeline/_simulate Response: -[source,js] +[source,console-result] -------------------------------------------------- { "docs": [ @@ -173,7 +173,7 @@ POST _ingest/pipeline/_simulate?verbose Response: -[source,js] +[source,console-result] -------------------------------------------------- { "docs": [ diff --git a/docs/reference/ingest/ingest-node.asciidoc b/docs/reference/ingest/ingest-node.asciidoc index 41463538606a4..e9813f44f5385 100644 --- a/docs/reference/ingest/ingest-node.asciidoc +++ b/docs/reference/ingest/ingest-node.asciidoc @@ -272,7 +272,7 @@ GET test/_doc/2 -------------------------------------------------- // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { "_index": "test", @@ -461,7 +461,7 @@ GET test/_doc/2 -------------------------------------------------- // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { "_index": "test", @@ -582,7 +582,7 @@ GET test/_doc/1 // TEST[continued] //// -[source,js] +[source,console-result] -------------------------------------------------- { "_index": "test", diff --git a/docs/reference/ingest/processors/circle.asciidoc b/docs/reference/ingest/processors/circle.asciidoc index 7e577a59d50c4..5669c69414782 100644 --- a/docs/reference/ingest/processors/circle.asciidoc +++ b/docs/reference/ingest/processors/circle.asciidoc @@ -70,7 +70,7 @@ GET circles/_doc/1 The response from the above index request: -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -108,7 +108,7 @@ GET circles/_doc/2 The response from the above index request: -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, diff --git a/docs/reference/ingest/processors/date-index-name.asciidoc b/docs/reference/ingest/processors/date-index-name.asciidoc index 52e29dfb120ed..7ffae4909a349 100644 --- a/docs/reference/ingest/processors/date-index-name.asciidoc +++ b/docs/reference/ingest/processors/date-index-name.asciidoc @@ -45,7 +45,7 @@ PUT /myindex/_doc/1?pipeline=monthlyindex -------------------------------------------------- // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { "_index" : "myindex-2016-04-01", @@ -101,7 +101,7 @@ POST _ingest/pipeline/_simulate and the result: -[source,js] +[source,console-result] -------------------------------------------------- { "docs" : [ diff --git a/docs/reference/ingest/processors/geoip.asciidoc b/docs/reference/ingest/processors/geoip.asciidoc index 3be65bb65be1d..322719e4995c4 100644 --- a/docs/reference/ingest/processors/geoip.asciidoc +++ b/docs/reference/ingest/processors/geoip.asciidoc @@ -63,7 +63,7 @@ GET my_index/_doc/my_id Which returns: -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -113,7 +113,7 @@ GET my_index/_doc/my_id returns this: -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -165,7 +165,7 @@ GET my_index/_doc/my_id Which returns: -[source,js] +[source,console-result] -------------------------------------------------- { "_index" : "my_index", @@ -249,7 +249,7 @@ GET /my_ip_locations/_search -------------------------------------------------- // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { "took" : 3, diff --git a/docs/reference/ingest/processors/grok.asciidoc b/docs/reference/ingest/processors/grok.asciidoc index c58d447f4b7b2..1ea259e7cb9a3 100644 --- a/docs/reference/ingest/processors/grok.asciidoc +++ b/docs/reference/ingest/processors/grok.asciidoc @@ -186,7 +186,7 @@ POST _ingest/pipeline/_simulate response: -[source,js] +[source,console-result] -------------------------------------------------- { "docs": [ @@ -246,7 +246,7 @@ POST _ingest/pipeline/_simulate -------------------------------------------------- //// -[source,js] +[source,console-result] -------------------------------------------------- { "docs": [ diff --git a/docs/reference/ingest/processors/pipeline.asciidoc b/docs/reference/ingest/processors/pipeline.asciidoc index 2eddf16316317..ff0744b337221 100644 --- a/docs/reference/ingest/processors/pipeline.asciidoc +++ b/docs/reference/ingest/processors/pipeline.asciidoc @@ -79,7 +79,7 @@ PUT /myindex/_doc/1?pipeline=pipelineB Response from the index request: -[source,js] +[source,console-result] -------------------------------------------------- { "_index": "myindex", diff --git a/docs/reference/ingest/processors/script.asciidoc b/docs/reference/ingest/processors/script.asciidoc index aab739d0419b0..d9aed04f57deb 100644 --- a/docs/reference/ingest/processors/script.asciidoc +++ b/docs/reference/ingest/processors/script.asciidoc @@ -77,7 +77,7 @@ PUT any_index/_doc/1?pipeline=my_index The response from the above index request: -[source,js] +[source,console-result] -------------------------------------------------- { "_index": "my_index", diff --git a/docs/reference/ingest/processors/set.asciidoc b/docs/reference/ingest/processors/set.asciidoc index 8ea0e7101e54d..9aba07b73f657 100644 --- a/docs/reference/ingest/processors/set.asciidoc +++ b/docs/reference/ingest/processors/set.asciidoc @@ -56,7 +56,8 @@ POST _ingest/pipeline/set_os/_simulate -------------------------------------------------- Result: -[source,js] + +[source,console-result] -------------------------------------------------- { "docs" : [ diff --git a/docs/reference/ingest/processors/user-agent.asciidoc b/docs/reference/ingest/processors/user-agent.asciidoc index 6993e449f47ef..67dc76c478ea7 100644 --- a/docs/reference/ingest/processors/user-agent.asciidoc +++ b/docs/reference/ingest/processors/user-agent.asciidoc @@ -45,7 +45,7 @@ GET my_index/_doc/my_id Which returns -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, diff --git a/docs/reference/licensing/get-basic-status.asciidoc b/docs/reference/licensing/get-basic-status.asciidoc index 38abc087d9576..59b91d1c6c991 100644 --- a/docs/reference/licensing/get-basic-status.asciidoc +++ b/docs/reference/licensing/get-basic-status.asciidoc @@ -39,7 +39,8 @@ GET /_license/basic_status ------------------------------------------------------------ Example response: -[source,js] + +[source,console-result] ------------------------------------------------------------ { "eligible_to_start_basic": true diff --git a/docs/reference/licensing/get-license.asciidoc b/docs/reference/licensing/get-license.asciidoc index c49e85384a04e..f38e8c0fffdb0 100644 --- a/docs/reference/licensing/get-license.asciidoc +++ b/docs/reference/licensing/get-license.asciidoc @@ -49,7 +49,7 @@ The following example provides information about a trial license: GET /_license -------------------------------------------------- -[source,js] +[source,console-result] -------------------------------------------------- { "license" : { diff --git a/docs/reference/licensing/get-trial-status.asciidoc b/docs/reference/licensing/get-trial-status.asciidoc index b6caaf0252ca2..cb1a3772ca06f 100644 --- a/docs/reference/licensing/get-trial-status.asciidoc +++ b/docs/reference/licensing/get-trial-status.asciidoc @@ -45,7 +45,8 @@ GET /_license/trial_status ------------------------------------------------------------ Example response: -[source,js] + +[source,console-result] ------------------------------------------------------------ { "eligible_to_start_trial": true diff --git a/docs/reference/mapping/params/normalizer.asciidoc b/docs/reference/mapping/params/normalizer.asciidoc index 288faa931b62c..b85c45fd807ed 100644 --- a/docs/reference/mapping/params/normalizer.asciidoc +++ b/docs/reference/mapping/params/normalizer.asciidoc @@ -74,7 +74,7 @@ GET index/_search The above queries match documents 1 and 2 since `BÀR` is converted to `bar` at both index and query time. -[source,js] +[source,console-result] ---------------------------- { "took": $body.took, @@ -137,7 +137,7 @@ GET index/_search returns -[source,js] +[source,console-result] ---------------------------- { "took": 43, diff --git a/docs/reference/mapping/types/parent-join.asciidoc b/docs/reference/mapping/types/parent-join.asciidoc index 94909417315d7..292e5b7b468e4 100644 --- a/docs/reference/mapping/types/parent-join.asciidoc +++ b/docs/reference/mapping/types/parent-join.asciidoc @@ -166,7 +166,7 @@ GET my_index/_search Will return: -[source,js] +[source,console-result] -------------------------------------------------- { ..., diff --git a/docs/reference/mapping/types/percolator.asciidoc b/docs/reference/mapping/types/percolator.asciidoc index 51498e34555da..cd958c6fe234b 100644 --- a/docs/reference/mapping/types/percolator.asciidoc +++ b/docs/reference/mapping/types/percolator.asciidoc @@ -179,7 +179,7 @@ GET /queries/_search now returns matches from the new index: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 3, @@ -370,7 +370,7 @@ GET /test_index/_search This results in a response like this: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 6, @@ -527,7 +527,7 @@ GET /my_queries1/_search -------------------------------------------------- // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { "took": 6, diff --git a/docs/reference/mapping/types/range.asciidoc b/docs/reference/mapping/types/range.asciidoc index cd6bfac03fd63..186096c0e9db7 100644 --- a/docs/reference/mapping/types/range.asciidoc +++ b/docs/reference/mapping/types/range.asciidoc @@ -17,7 +17,7 @@ The following range types are supported: Below is an example of configuring a mapping with various range fields followed by an example that indexes several range types. -[source,js] +[source,console] -------------------------------------------------- PUT range_index { @@ -49,7 +49,6 @@ PUT range_index/_doc/1?refresh } } -------------------------------------------------- -//CONSOLE // TESTSETUP <1> `date_range` types accept the same field parameters defined by the <> type. @@ -75,7 +74,7 @@ GET range_index/_search The result produced by the above query. -[source,js] +[source,console-result] -------------------------------------------------- { "took": 13, @@ -137,7 +136,7 @@ GET range_index/_search This query produces a similar result: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 13, diff --git a/docs/reference/mapping/types/search-as-you-type.asciidoc b/docs/reference/mapping/types/search-as-you-type.asciidoc index cc26f3666fda3..12e608fed8789 100644 --- a/docs/reference/mapping/types/search-as-you-type.asciidoc +++ b/docs/reference/mapping/types/search-as-you-type.asciidoc @@ -102,7 +102,7 @@ GET my_index/_search -------------------------------------------------- // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { "took" : 44, diff --git a/docs/reference/ml/anomaly-detection/apis/delete-forecast.asciidoc b/docs/reference/ml/anomaly-detection/apis/delete-forecast.asciidoc index 293fe0bf95db7..dd6577f2262b0 100644 --- a/docs/reference/ml/anomaly-detection/apis/delete-forecast.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/delete-forecast.asciidoc @@ -74,6 +74,7 @@ DELETE _ml/anomaly_detectors/total-requests/_forecast/_all // TEST[skip:setup:server_metrics_openjob] If the request does not encounter errors, you receive the following result: + [source,js] ---- { diff --git a/docs/reference/ml/anomaly-detection/apis/delete-job.asciidoc b/docs/reference/ml/anomaly-detection/apis/delete-job.asciidoc index a258c50978fb4..202f7cfcd333d 100644 --- a/docs/reference/ml/anomaly-detection/apis/delete-job.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/delete-job.asciidoc @@ -84,7 +84,8 @@ DELETE _ml/anomaly_detectors/total-requests?wait_for_completion=false When `wait_for_completion` is set to `false`, the response contains the id of the job deletion task: -[source,js] + +[source,console-result] ---- { "task": "oTUltX4IQMOUUVeiohTt8A:39" diff --git a/docs/reference/ml/anomaly-detection/apis/find-file-structure.asciidoc b/docs/reference/ml/anomaly-detection/apis/find-file-structure.asciidoc index 33dfd12e6fcc5..5fa56eacb8203 100644 --- a/docs/reference/ml/anomaly-detection/apis/find-file-structure.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/find-file-structure.asciidoc @@ -253,7 +253,7 @@ POST _ml/find_file_structure If the request does not encounter errors, you receive the following result: -[source,js] +[source,console-result] ---- { "num_lines_analyzed" : 24, <1> diff --git a/docs/reference/ml/anomaly-detection/apis/flush-job.asciidoc b/docs/reference/ml/anomaly-detection/apis/flush-job.asciidoc index b681e165165eb..a306817e3c04e 100644 --- a/docs/reference/ml/anomaly-detection/apis/flush-job.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/flush-job.asciidoc @@ -78,7 +78,8 @@ POST _ml/anomaly_detectors/total-requests/_flush // TEST[skip:setup:server_metrics_openjob] When the operation succeeds, you receive the following results: -[source,js] + +[source,console-result] ---- { "flushed": true, diff --git a/docs/reference/ml/anomaly-detection/apis/get-calendar-event.asciidoc b/docs/reference/ml/anomaly-detection/apis/get-calendar-event.asciidoc index 6059cde7a73aa..6d6dbbcdadd66 100644 --- a/docs/reference/ml/anomaly-detection/apis/get-calendar-event.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/get-calendar-event.asciidoc @@ -94,7 +94,7 @@ GET _ml/calendars/planned-outages/events The API returns the following results: -[source,js] +[source,console-result] ---- { "count": 3, diff --git a/docs/reference/ml/anomaly-detection/apis/get-datafeed-stats.asciidoc b/docs/reference/ml/anomaly-detection/apis/get-datafeed-stats.asciidoc index fad72220b6c74..ae142720e273f 100644 --- a/docs/reference/ml/anomaly-detection/apis/get-datafeed-stats.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/get-datafeed-stats.asciidoc @@ -96,7 +96,8 @@ GET _ml/datafeeds/datafeed-total-requests/_stats // TEST[skip:setup:server_metrics_startdf] The API returns the following results: -[source,js] + +[source,console-result] ---- { "count": 1, diff --git a/docs/reference/ml/anomaly-detection/apis/get-datafeed.asciidoc b/docs/reference/ml/anomaly-detection/apis/get-datafeed.asciidoc index d5e632deffb95..1903be47e661c 100644 --- a/docs/reference/ml/anomaly-detection/apis/get-datafeed.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/get-datafeed.asciidoc @@ -92,7 +92,8 @@ GET _ml/datafeeds/datafeed-total-requests // TEST[skip:setup:server_metrics_datafeed] The API returns the following results: -[source,js] + +[source,console-result] ---- { "count": 1, diff --git a/docs/reference/ml/anomaly-detection/apis/get-job.asciidoc b/docs/reference/ml/anomaly-detection/apis/get-job.asciidoc index 54d3d7cf26203..c1d6be4eb1c1a 100644 --- a/docs/reference/ml/anomaly-detection/apis/get-job.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/get-job.asciidoc @@ -89,7 +89,8 @@ GET _ml/anomaly_detectors/total-requests // TEST[skip:setup:server_metrics_job] The API returns the following results: -[source,js] + +[source,console-result] ---- { "count": 1, diff --git a/docs/reference/ml/anomaly-detection/apis/get-ml-info.asciidoc b/docs/reference/ml/anomaly-detection/apis/get-ml-info.asciidoc index 4f0179629539e..a90ed90ebc676 100644 --- a/docs/reference/ml/anomaly-detection/apis/get-ml-info.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/get-ml-info.asciidoc @@ -44,7 +44,8 @@ GET _ml/info // TEST This is a possible response: -[source,js] + +[source,console-result] ---- { "defaults" : { diff --git a/docs/reference/ml/anomaly-detection/apis/put-datafeed.asciidoc b/docs/reference/ml/anomaly-detection/apis/put-datafeed.asciidoc index 248c8bba7ce70..e6c64c58e60e5 100644 --- a/docs/reference/ml/anomaly-detection/apis/put-datafeed.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/put-datafeed.asciidoc @@ -125,7 +125,8 @@ PUT _ml/datafeeds/datafeed-total-requests // TEST[skip:setup:server_metrics_job] When the {dfeed} is created, you receive the following results: -[source,js] + +[source,console-result] ---- { "datafeed_id": "datafeed-total-requests", diff --git a/docs/reference/ml/anomaly-detection/apis/put-job.asciidoc b/docs/reference/ml/anomaly-detection/apis/put-job.asciidoc index 8bd11cac89277..6b331bbf55693 100644 --- a/docs/reference/ml/anomaly-detection/apis/put-job.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/put-job.asciidoc @@ -119,7 +119,8 @@ PUT _ml/anomaly_detectors/total-requests -------------------------------------------------- When the job is created, you receive the following results: -[source,js] + +[source,console-result] ---- { "job_id" : "total-requests", diff --git a/docs/reference/ml/anomaly-detection/apis/update-datafeed.asciidoc b/docs/reference/ml/anomaly-detection/apis/update-datafeed.asciidoc index 58a6ae56700f1..eb9e0d7dceeeb 100644 --- a/docs/reference/ml/anomaly-detection/apis/update-datafeed.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/update-datafeed.asciidoc @@ -119,7 +119,7 @@ POST _ml/datafeeds/datafeed-total-requests/_update When the {dfeed} is updated, you receive the full {dfeed} configuration with with the updated values: -[source,js] +[source,console-result] ---- { "datafeed_id": "datafeed-total-requests", diff --git a/docs/reference/ml/anomaly-detection/apis/update-job.asciidoc b/docs/reference/ml/anomaly-detection/apis/update-job.asciidoc index 7098ba1ebbce3..e35ac43863821 100644 --- a/docs/reference/ml/anomaly-detection/apis/update-job.asciidoc +++ b/docs/reference/ml/anomaly-detection/apis/update-job.asciidoc @@ -131,7 +131,7 @@ POST _ml/anomaly_detectors/total-requests/_update When the {anomaly-job} is updated, you receive a summary of the job configuration information, including the updated property values. For example: -[source,js] +[source,console-result] ---- { "job_id": "total-requests", diff --git a/docs/reference/ml/anomaly-detection/categories.asciidoc b/docs/reference/ml/anomaly-detection/categories.asciidoc index aa7fd8a450239..a5e4d05541617 100644 --- a/docs/reference/ml/anomaly-detection/categories.asciidoc +++ b/docs/reference/ml/anomaly-detection/categories.asciidoc @@ -19,7 +19,7 @@ time. You can then detect anomalies and surface rare events or unusual types of messages by using count or rare functions. For example: //Obtained from it_ops_new_app_logs.sh -[source,js] +[source,console] ---------------------------------- PUT _ml/anomaly_detectors/it_ops_new_logs { @@ -43,8 +43,8 @@ PUT _ml/anomaly_detectors/it_ops_new_logs } } ---------------------------------- -//CONSOLE // TEST[skip:needs-licence] + <1> The `categorization_field_name` property indicates which field will be categorized. <2> The resulting categories are used in a detector by setting `by_field_name`, @@ -89,7 +89,7 @@ supported, as described in the <>. You can, however, change the tokenization rules by customizing the way the categorization field values are interpreted. For example: -[source,js] +[source,console] ---------------------------------- PUT _ml/anomaly_detectors/it_ops_new_logs2 { @@ -127,8 +127,8 @@ PUT _ml/anomaly_detectors/it_ops_new_logs2 } } ---------------------------------- -//CONSOLE // TEST[skip:needs-licence] + <1> The {ref}/analysis-pattern-replace-charfilter.html[`pattern_replace` character filter] here achieves exactly the same as the `categorization_filters` in the first @@ -151,7 +151,7 @@ equivalent to the following analyzer, which is defined using only built-in {es} {ref}/analysis-tokenizers.html[tokenizers] and {ref}/analysis-tokenfilters.html[token filters]: -[source,js] +[source,console] ---------------------------------- PUT _ml/anomaly_detectors/it_ops_new_logs3 { @@ -194,8 +194,8 @@ PUT _ml/anomaly_detectors/it_ops_new_logs3 } } ---------------------------------- -//CONSOLE // TEST[skip:needs-licence] + <1> Tokens basically consist of hyphens, digits, letters, underscores and dots. <2> By default, categorization ignores tokens that begin with a digit. <3> By default, categorization also ignores tokens that are hexadecimal numbers. diff --git a/docs/reference/ml/anomaly-detection/customurl.asciidoc b/docs/reference/ml/anomaly-detection/customurl.asciidoc index 89a5f5d8ce894..1c0c463e9e8f5 100644 --- a/docs/reference/ml/anomaly-detection/customurl.asciidoc +++ b/docs/reference/ml/anomaly-detection/customurl.asciidoc @@ -91,7 +91,7 @@ dashboard query seeks a match for all of the terms of the category. For example, the following API updates a job to add a custom URL that uses `$earliest$`, `$latest$`, and `$mlcategoryterms$` tokens: -[source,js] +[source,console] ---------------------------------- POST _ml/anomaly_detectors/sample_job/_update { @@ -106,7 +106,6 @@ POST _ml/anomaly_detectors/sample_job/_update } } ---------------------------------- -//CONSOLE //TEST[skip:setup:sample_job] When you click this custom URL in the anomalies table in {kib}, it opens up the diff --git a/docs/reference/ml/anomaly-detection/populations.asciidoc b/docs/reference/ml/anomaly-detection/populations.asciidoc index febbbb29e5ee0..decbe6a3b35c0 100644 --- a/docs/reference/ml/anomaly-detection/populations.asciidoc +++ b/docs/reference/ml/anomaly-detection/populations.asciidoc @@ -26,7 +26,7 @@ of hundreds of thousands or millions of entities. To specify the population, use the `over_field_name` property. For example: -[source,js] +[source,console] ---------------------------------- PUT _ml/anomaly_detectors/population { @@ -50,8 +50,8 @@ PUT _ml/anomaly_detectors/population } } ---------------------------------- -//CONSOLE // TEST[skip:needs-licence] + <1> This `over_field_name` property indicates that the metrics for each client ( as identified by their IP address) are analyzed relative to other clients in each bucket. diff --git a/docs/reference/ml/df-analytics/apis/put-dfanalytics.asciidoc b/docs/reference/ml/df-analytics/apis/put-dfanalytics.asciidoc index b46de02ca0bf5..9a8c6ecc5cbe7 100644 --- a/docs/reference/ml/df-analytics/apis/put-dfanalytics.asciidoc +++ b/docs/reference/ml/df-analytics/apis/put-dfanalytics.asciidoc @@ -147,7 +147,7 @@ PUT _ml/data_frame/analytics/loganalytics The API returns the following result: -[source,js] +[source,console-result] ---- { "id": "loganalytics", diff --git a/docs/reference/modules/cross-cluster-search.asciidoc b/docs/reference/modules/cross-cluster-search.asciidoc index 3a5f17a2bf1de..f2f7fdfc66663 100644 --- a/docs/reference/modules/cross-cluster-search.asciidoc +++ b/docs/reference/modules/cross-cluster-search.asciidoc @@ -76,7 +76,7 @@ GET /cluster_one:twitter/_search The API returns the following response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 150, @@ -148,7 +148,7 @@ GET /twitter,cluster_one:twitter,cluster_two:twitter/_search The API returns the following response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 150, diff --git a/docs/reference/query-dsl/percolate-query.asciidoc b/docs/reference/query-dsl/percolate-query.asciidoc index b32a7328acba2..192b80b473556 100644 --- a/docs/reference/query-dsl/percolate-query.asciidoc +++ b/docs/reference/query-dsl/percolate-query.asciidoc @@ -78,7 +78,7 @@ GET /my-index/_search The above request will yield the following response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 13, @@ -229,7 +229,7 @@ GET /my-index/_search <1> The documents array contains 4 documents that are going to be percolated at the same time. -[source,js] +[source,console-result] -------------------------------------------------- { "took": 13, @@ -410,7 +410,7 @@ GET /my-index/_search This will yield the following response. -[source,js] +[source,console-result] -------------------------------------------------- { "took": 7, @@ -518,7 +518,7 @@ GET /my-index/_search The slightly different response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 13, @@ -617,7 +617,7 @@ If that isn't specified then the `field` parameter will be used, which in this c The above search request returns a response similar to this: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 13, diff --git a/docs/reference/query-dsl/span-containing-query.asciidoc b/docs/reference/query-dsl/span-containing-query.asciidoc index 7b5fb0ba7aeae..86d01a95914d4 100644 --- a/docs/reference/query-dsl/span-containing-query.asciidoc +++ b/docs/reference/query-dsl/span-containing-query.asciidoc @@ -7,7 +7,7 @@ Returns matches which enclose another span query. The span containing query maps to Lucene `SpanContainingQuery`. Here is an example: -[source,js] +[source,console] -------------------------------------------------- GET /_search { @@ -30,7 +30,6 @@ GET /_search } } -------------------------------------------------- -// CONSOLE The `big` and `little` clauses can be any span type query. Matching spans from `big` that contain matches from `little` are returned. diff --git a/docs/reference/query-dsl/term-query.asciidoc b/docs/reference/query-dsl/term-query.asciidoc index a80f065dcd781..aa49a051dff69 100644 --- a/docs/reference/query-dsl/term-query.asciidoc +++ b/docs/reference/query-dsl/term-query.asciidoc @@ -188,7 +188,7 @@ any documents containing the `quick`, `brown`, or `fox` tokens in the Here's the response for the `match` query search containing the indexed document in the results. -[source,js] +[source,console-result] ---- { "took" : 1, diff --git a/docs/reference/query-dsl/terms-query.asciidoc b/docs/reference/query-dsl/terms-query.asciidoc index 71aa11eb12575..fa7f7c1c7d3fb 100644 --- a/docs/reference/query-dsl/terms-query.asciidoc +++ b/docs/reference/query-dsl/terms-query.asciidoc @@ -208,7 +208,7 @@ GET my_index/_search?pretty Because document 2 and document 1 both contain `blue` as a value in the `color` field, {es} returns both documents. -[source,js] +[source,console-result] ---- { "took" : 17, diff --git a/docs/reference/rest-api/info.asciidoc b/docs/reference/rest-api/info.asciidoc index 224e77bd1e0cd..ee66ce8935d2f 100644 --- a/docs/reference/rest-api/info.asciidoc +++ b/docs/reference/rest-api/info.asciidoc @@ -48,7 +48,8 @@ GET /_xpack // CONSOLE Example response: -[source,js] + +[source,console-result] ------------------------------------------------------------ { "build" : { diff --git a/docs/reference/rollup/apis/rollup-search.asciidoc b/docs/reference/rollup/apis/rollup-search.asciidoc index ec2a554d09ff4..127d06f6df9cc 100644 --- a/docs/reference/rollup/apis/rollup-search.asciidoc +++ b/docs/reference/rollup/apis/rollup-search.asciidoc @@ -109,7 +109,7 @@ GET /sensor_rollup/_rollup_search The query is targeting the `sensor_rollup` data, since this contains the rollup data as configured in the job. A `max` aggregation has been used on the `temperature` field, yielding the following response: -[source,js] +[source,console-result] ---- { "took" : 102, @@ -159,7 +159,7 @@ GET sensor_rollup/_rollup_search // TEST[continued] // TEST[catch:/illegal_argument_exception/] -[source,js] +[source,console-result] ---- { "error" : { @@ -215,7 +215,7 @@ index will be used. The response to the above query will look as expected, despite spanning rollup and non-rollup indices: -[source,js] +[source,console-result] ---- { "took" : 102, @@ -238,4 +238,4 @@ The response to the above query will look as expected, despite spanning rollup a } ---- // TESTRESPONSE[s/"took" : 102/"took" : $body.$_path/] -// TESTRESPONSE[s/"_shards" : \.\.\. /"_shards" : $body.$_path/] \ No newline at end of file +// TESTRESPONSE[s/"_shards" : \.\.\. /"_shards" : $body.$_path/] diff --git a/docs/reference/rollup/rollup-getting-started.asciidoc b/docs/reference/rollup/rollup-getting-started.asciidoc index 7dcc36d29a9dd..06bca3c9d4860 100644 --- a/docs/reference/rollup/rollup-getting-started.asciidoc +++ b/docs/reference/rollup/rollup-getting-started.asciidoc @@ -149,7 +149,7 @@ is exactly as you'd expect. If you were to execute that query, you'd receive a result that looks like a normal aggregation response: -[source,js] +[source,console-result] ---- { "took" : 102, @@ -223,7 +223,7 @@ GET /sensor_rollup/_rollup_search Which returns a corresponding response: -[source,js] +[source,console-result] ---- { "took" : 93, diff --git a/docs/reference/rollup/rollup-search-limitations.asciidoc b/docs/reference/rollup/rollup-search-limitations.asciidoc index 81cb162bd3c11..5b53cf615e115 100644 --- a/docs/reference/rollup/rollup-search-limitations.asciidoc +++ b/docs/reference/rollup/rollup-search-limitations.asciidoc @@ -61,7 +61,7 @@ GET sensor_rollup/_rollup_search The response will tell you that the field and aggregation were not possible, because no rollup jobs were found which contained them: -[source,js] +[source,console-result] ---- { "error" : { diff --git a/docs/reference/search/count.asciidoc b/docs/reference/search/count.asciidoc index fa0c4d64d2ea8..331cf70685eec 100644 --- a/docs/reference/search/count.asciidoc +++ b/docs/reference/search/count.asciidoc @@ -7,7 +7,7 @@ The query can either be provided using a simple query string as a parameter, or using the <> defined within the request body. Here is an example: -[source,js] +[source,console] -------------------------------------------------- PUT /twitter/_doc/1?refresh { @@ -23,7 +23,6 @@ GET /twitter/_count } } -------------------------------------------------- -//CONSOLE NOTE: The query being sent in the body must be nested in a `query` key, same as the <> works diff --git a/docs/reference/search/profile.asciidoc b/docs/reference/search/profile.asciidoc index 44628133f6bff..2d5ceb674540f 100644 --- a/docs/reference/search/profile.asciidoc +++ b/docs/reference/search/profile.asciidoc @@ -36,7 +36,7 @@ for the search This will yield the following result: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 25, @@ -175,7 +175,7 @@ to more complex examples. First, the overall structure of the profile response is as follows: -[source,js] +[source,console-result] -------------------------------------------------- { "profile": { @@ -251,7 +251,7 @@ The overall structure of this query tree will resemble your original Elasticsear (or sometimes very) different. It will also use similar but not always identical naming. Using our previous `match` query example, let's analyze the `query` section: -[source,js] +[source,console-result] -------------------------------------------------- "query": [ { @@ -300,7 +300,7 @@ breakdown, etc). Children are allowed to have their own children. The `breakdown` component lists detailed timing statistics about low-level Lucene execution: -[source,js] +[source,console-result] -------------------------------------------------- "breakdown": { "score": 51306, @@ -410,7 +410,7 @@ filters, etc. Looking at the previous example: -[source,js] +[source,console-result] -------------------------------------------------- "collector": [ { @@ -554,7 +554,7 @@ This example has: And the response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -746,7 +746,7 @@ GET /twitter/_search This yields the following aggregation profile output: -[source,js] +[source,console-result] -------------------------------------------------- { "profile" : { diff --git a/docs/reference/search/request-body.asciidoc b/docs/reference/search/request-body.asciidoc index b84d695e9f109..9d34145232de3 100644 --- a/docs/reference/search/request-body.asciidoc +++ b/docs/reference/search/request-body.asciidoc @@ -104,7 +104,7 @@ GET /twitter/_search The API returns the following response: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 1, @@ -170,7 +170,7 @@ as many documents matching the query when it was early terminated. Also if the query was terminated early, the `terminated_early` flag will be set to `true` in the response. -[source,js] +[source,console-result] -------------------------------------------------- { "took": 3, diff --git a/docs/reference/search/request/highlighting.asciidoc b/docs/reference/search/request/highlighting.asciidoc index 58448f246f61e..a800bebf7d44d 100644 --- a/docs/reference/search/request/highlighting.asciidoc +++ b/docs/reference/search/request/highlighting.asciidoc @@ -851,7 +851,7 @@ GET twitter/_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... @@ -910,7 +910,7 @@ GET twitter/_search Response: -[source,js] +[source,console-result] -------------------------------------------------- { ... diff --git a/docs/reference/search/request/inner-hits.asciidoc b/docs/reference/search/request/inner-hits.asciidoc index 8aef784e69d50..8e3641f952503 100644 --- a/docs/reference/search/request/inner-hits.asciidoc +++ b/docs/reference/search/request/inner-hits.asciidoc @@ -130,7 +130,7 @@ POST test/_search An example of a response snippet that could be generated from the above search request: -[source,js] +[source,console-result] -------------------------------------------------- { ..., @@ -259,7 +259,7 @@ POST test/_search Response not included in text but tested for completeness sake. -[source,js] +[source,console-result] -------------------------------------------------- { ..., @@ -378,7 +378,7 @@ POST test/_search Which would look like: -[source,js] +[source,console-result] -------------------------------------------------- { ..., @@ -493,7 +493,7 @@ POST test/_search An example of a response snippet that could be generated from the above search request: -[source,js] +[source,console-result] -------------------------------------------------- { ..., diff --git a/docs/reference/search/request/track-total-hits.asciidoc b/docs/reference/search/request/track-total-hits.asciidoc index 24b1f1f39acf4..9635d8f4a46f6 100644 --- a/docs/reference/search/request/track-total-hits.asciidoc +++ b/docs/reference/search/request/track-total-hits.asciidoc @@ -36,7 +36,7 @@ GET twitter/_search \... returns: -[source,js] +[source,console-result] -------------------------------------------------- { "_shards": ... @@ -86,7 +86,7 @@ bound of the total (`"gte"`). For instance the following response: -[source,js] +[source,console-result] -------------------------------------------------- { "_shards": ... @@ -157,7 +157,7 @@ GET twitter/_search \... returns: -[source,js] +[source,console-result] -------------------------------------------------- { "_shards": ... diff --git a/docs/reference/search/search-shards.asciidoc b/docs/reference/search/search-shards.asciidoc index 288f8b7545ec8..5d9001055257d 100644 --- a/docs/reference/search/search-shards.asciidoc +++ b/docs/reference/search/search-shards.asciidoc @@ -64,7 +64,7 @@ GET /twitter/_search_shards The API returns the following result: -[source,js] +[source,console-result] -------------------------------------------------- { "nodes": ..., @@ -149,7 +149,7 @@ GET /twitter/_search_shards?routing=foo,bar The API returns the following result: -[source,js] +[source,console-result] -------------------------------------------------- { "nodes": ..., diff --git a/docs/reference/search/suggesters.asciidoc b/docs/reference/search/suggesters.asciidoc index 78aa5d3628564..e9b7d8c925869 100644 --- a/docs/reference/search/suggesters.asciidoc +++ b/docs/reference/search/suggesters.asciidoc @@ -68,7 +68,7 @@ entries. Each entry is effectively a token from the suggest text and contains the suggestion entry text, the original start offset and length in the suggest text and if found an arbitrary number of options. -[source,js] +[source,console-result] -------------------------------------------------- { "_shards": ... diff --git a/docs/reference/search/suggesters/completion-suggest.asciidoc b/docs/reference/search/suggesters/completion-suggest.asciidoc index 1090eb6652dcc..86a1701719df3 100644 --- a/docs/reference/search/suggesters/completion-suggest.asciidoc +++ b/docs/reference/search/suggesters/completion-suggest.asciidoc @@ -171,7 +171,7 @@ POST music/_search?pretty returns this response: -[source,js] +[source,console-result] -------------------------------------------------- { "_shards" : { @@ -243,7 +243,7 @@ POST music/_search Which should look like: -[source,js] +[source,console-result] -------------------------------------------------- { "took": 6, diff --git a/docs/reference/search/suggesters/misc.asciidoc b/docs/reference/search/suggesters/misc.asciidoc index 075b2a6532338..104cd51c3fd5e 100644 --- a/docs/reference/search/suggesters/misc.asciidoc +++ b/docs/reference/search/suggesters/misc.asciidoc @@ -30,7 +30,7 @@ POST _search?typed_keys In the response, the suggester names will be changed to respectively `term#my-first-suggester` and `phrase#my-second-suggester`, reflecting the types of each suggestion: -[source,js] +[source,console-result] -------------------------------------------------- { "suggest": { diff --git a/docs/reference/search/suggesters/phrase-suggest.asciidoc b/docs/reference/search/suggesters/phrase-suggest.asciidoc index 9d49fc16bd00e..dd93f084c0e57 100644 --- a/docs/reference/search/suggesters/phrase-suggest.asciidoc +++ b/docs/reference/search/suggesters/phrase-suggest.asciidoc @@ -106,7 +106,7 @@ POST test/_search The response contains suggestions scored by the most likely spell correction first. In this case we received the expected correction "nobel prize". -[source,js] +[source,console-result] -------------------------------------------------- { "_shards": ... diff --git a/docs/reference/search/uri-request.asciidoc b/docs/reference/search/uri-request.asciidoc index 5e0a1fc8b7baa..1c523fae2a911 100644 --- a/docs/reference/search/uri-request.asciidoc +++ b/docs/reference/search/uri-request.asciidoc @@ -118,7 +118,7 @@ GET twitter/_search?q=user:kimchy The API returns the following response: -[source,js] +[source,console-result] -------------------------------------------------- { "timed_out": false, diff --git a/docs/reference/search/validate.asciidoc b/docs/reference/search/validate.asciidoc index 4f6d948fd3eac..1b77fde008cc8 100644 --- a/docs/reference/search/validate.asciidoc +++ b/docs/reference/search/validate.asciidoc @@ -118,7 +118,7 @@ GET twitter/_validate/query?explain=true responds with: -[source,js] +[source,console-result] -------------------------------------------------- { "valid" : false, diff --git a/docs/reference/setup/logging-config.asciidoc b/docs/reference/setup/logging-config.asciidoc index 29a125ec47227..4cc2615d214e6 100644 --- a/docs/reference/setup/logging-config.asciidoc +++ b/docs/reference/setup/logging-config.asciidoc @@ -215,6 +215,7 @@ log level to `error`. You can identify what is triggering deprecated functionality if `X-Opaque-Id` was used as an HTTP header. The user ID is included in the `X-Opaque-ID` field in deprecation JSON logs. + [source,js] --------------------------- { diff --git a/docs/reference/sql/endpoints/rest.asciidoc b/docs/reference/sql/endpoints/rest.asciidoc index 650b834c4620f..0bc98e34c0d75 100644 --- a/docs/reference/sql/endpoints/rest.asciidoc +++ b/docs/reference/sql/endpoints/rest.asciidoc @@ -143,7 +143,7 @@ POST /_sql?format=json Which returns: -[source,js] +[source,console-result] -------------------------------------------------- { "columns": [ @@ -285,7 +285,7 @@ POST /_sql?format=json Which looks like: -[source,js] +[source,console-result] -------------------------------------------------- { "rows" : [ @@ -388,7 +388,7 @@ POST /_sql?format=json Which returns: -[source,js] +[source,console-result] -------------------------------------------------- { "columns": [ @@ -424,7 +424,7 @@ POST /_sql?format=json Which looks like: -[source,js] +[source,console-result] -------------------------------------------------- { "values": [ diff --git a/x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc b/x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc index 742b17c0c998e..2a60e09f65ceb 100644 --- a/x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc +++ b/x-pack/docs/en/rest-api/watcher/ack-watch.asciidoc @@ -103,7 +103,7 @@ GET _watcher/watch/my_watch The action state of a newly-created watch is `awaits_successful_execution`: -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -148,7 +148,7 @@ GET _watcher/watch/my_watch and the action is now in `ackable` state: -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -199,7 +199,7 @@ GET _watcher/watch/my_watch // CONSOLE // TEST[continued] -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -266,7 +266,7 @@ POST _watcher/watch/my_watch/_ack The response looks like a get watch response, but only contains the status: -[source,js] +[source,console-result] -------------------------------------------------- { "status": { diff --git a/x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc b/x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc index aa78af4439b10..a2cd3fb17d6b3 100644 --- a/x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc +++ b/x-pack/docs/en/rest-api/watcher/activate-watch.asciidoc @@ -54,7 +54,7 @@ GET _watcher/watch/my_watch // CONSOLE // TEST[setup:my_inactive_watch] -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -89,7 +89,7 @@ PUT _watcher/watch/my_watch/_activate The new state of the watch is returned as part of its overall status: -[source,js] +[source,console-result] -------------------------------------------------- { "status": { diff --git a/x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc b/x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc index 6023d020a4a6f..763020d001247 100644 --- a/x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc +++ b/x-pack/docs/en/rest-api/watcher/deactivate-watch.asciidoc @@ -54,7 +54,7 @@ GET _watcher/watch/my_watch // CONSOLE // TEST[setup:my_active_watch] -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -89,7 +89,7 @@ PUT _watcher/watch/my_watch/_deactivate The new state of the watch is returned as part of its overall status: -[source,js] +[source,console-result] -------------------------------------------------- { "status": { diff --git a/x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc b/x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc index 42df82ddc8863..e02e839b55012 100644 --- a/x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc +++ b/x-pack/docs/en/rest-api/watcher/execute-watch.asciidoc @@ -186,7 +186,7 @@ POST _watcher/watch/my_watch/_execute This is an example of the output: -[source,js] +[source,console-result] -------------------------------------------------- { "_id": "my_watch_0-2015-06-02T23:17:55.124Z", <1> diff --git a/x-pack/docs/en/rest-api/watcher/get-watch.asciidoc b/x-pack/docs/en/rest-api/watcher/get-watch.asciidoc index b24d6be70e706..5b5f43043ec7b 100644 --- a/x-pack/docs/en/rest-api/watcher/get-watch.asciidoc +++ b/x-pack/docs/en/rest-api/watcher/get-watch.asciidoc @@ -54,7 +54,7 @@ GET _watcher/watch/my_watch Response: -[source,js] +[source,console-result] -------------------------------------------------- { "found": true, @@ -106,4 +106,5 @@ Response: } -------------------------------------------------- // TESTRESPONSE[s/"timestamp": "2015-05-26T18:21:08.630Z"/"timestamp": "$body.status.state.timestamp"/] + <1> The current status of the watch