This commit is contained in:
parent
61756597ae
commit
f04573f8e8
|
@ -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" : {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -37,12 +37,10 @@ parameter for the snapshot API. Alternatively, you can extract these
|
|||
configuration values in text format by using the
|
||||
<<cluster-get-settings, get settings API>>:
|
||||
|
||||
[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.
|
||||
|
|
|
@ -62,7 +62,7 @@ of groups that have recorded interactions.
|
|||
|
||||
Response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"took": 9,
|
||||
|
|
|
@ -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]
|
||||
---------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -422,7 +422,7 @@ GET /_search
|
|||
|
||||
\... returns:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
@ -520,7 +520,7 @@ GET /_search
|
|||
|
||||
\... returns:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -55,7 +55,7 @@ Then one can define any type of aggregation over these nested documents.
|
|||
|
||||
Response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -98,7 +98,7 @@ object types have been defined in the mapping
|
|||
|
||||
Possible response snippet:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"aggregations": {
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -144,7 +144,7 @@ GET /_search
|
|||
|
||||
Response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -58,7 +58,7 @@ GET news/_search
|
|||
|
||||
Response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"took": 9,
|
||||
|
|
|
@ -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 <<search-aggregations-bucket-terms-aggregation-approximate-counts,below>>
|
||||
<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 <<search-aggregations-bucket-terms-aggregation-order,order>>
|
||||
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -24,7 +24,7 @@ POST /sales/_search?size=0
|
|||
|
||||
Response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -25,7 +25,7 @@ POST /sales/_search?size=0
|
|||
|
||||
Response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
---------------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -25,7 +25,7 @@ POST /sales/_search?size=0
|
|||
|
||||
Response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -26,7 +26,7 @@ POST /sales/_search?size=0
|
|||
|
||||
Resulting in:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -19,7 +19,7 @@ POST /sales/_search?size=0
|
|||
|
||||
Response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -68,7 +68,7 @@ POST /_search
|
|||
|
||||
And the following may be the response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"took": 11,
|
||||
|
|
|
@ -90,7 +90,7 @@ POST /sales/_search
|
|||
|
||||
And the following may be the response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"took": 11,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -64,7 +64,7 @@ POST /sales/_search
|
|||
|
||||
And the following may be the response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"took": 11,
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -69,7 +69,7 @@ POST /sales/_search
|
|||
|
||||
And the following may be the response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"took": 11,
|
||||
|
|
|
@ -67,7 +67,7 @@ POST /sales/_search
|
|||
|
||||
And the following may be the response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"took": 11,
|
||||
|
|
|
@ -67,7 +67,7 @@ POST /sales/_search
|
|||
|
||||
And the following may be the response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"took": 11,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -66,7 +66,7 @@ POST /sales/_search
|
|||
|
||||
And the following may be the response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"took": 11,
|
||||
|
|
|
@ -66,7 +66,7 @@ POST /sales/_search
|
|||
|
||||
And the following may be the response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"took": 11,
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -284,7 +284,7 @@ GET my_index/_search
|
|||
|
||||
/////////////////////
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
----------------------------
|
||||
{
|
||||
"took": $body.took,
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -213,7 +213,7 @@ GET /follower_index/_ccr/stats
|
|||
|
||||
The API returns the following results:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"indices" : [
|
||||
|
|
|
@ -52,7 +52,7 @@ POST /<leader_index>/_ccr/forget_follower
|
|||
// TEST[s/<leader_remote_cluster>/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" : {
|
||||
|
|
|
@ -101,7 +101,7 @@ GET /_ccr/stats
|
|||
|
||||
The API returns the following results:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"auto_follow_stats" : {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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": ...
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -63,7 +63,7 @@ GET _nodes/usage
|
|||
|
||||
The API returns the following response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"_nodes": {
|
||||
|
|
|
@ -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]
|
||||
--------------------------------------------------
|
||||
{
|
||||
...
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -84,7 +84,7 @@ POST _bulk
|
|||
|
||||
The result of this bulk operation is:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"took": 30,
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -176,7 +176,7 @@ DELETE /twitter/_doc/1
|
|||
|
||||
The API returns the following result:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"_shards" : {
|
||||
|
|
|
@ -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" : {
|
||||
|
|
|
@ -54,7 +54,7 @@ GET /test/_mget
|
|||
|
||||
And type:
|
||||
|
||||
[source,js]
|
||||
[source,console]
|
||||
--------------------------------------------------
|
||||
GET /test/_doc/_mget
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -202,7 +202,7 @@ GET /twitter/_termvectors/1
|
|||
|
||||
Response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"_id": "1",
|
||||
|
@ -340,7 +340,7 @@ GET /twitter/_termvectors
|
|||
|
||||
Response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"_index": "twitter",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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": ...
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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" : {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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" : {
|
||||
|
|
|
@ -45,7 +45,7 @@ Response:
|
|||
|
||||
The shard stores information is grouped by indices and shard ids.
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"indices": {
|
||||
|
|
|
@ -240,7 +240,7 @@ GET /_template/template_1?filter_path=*.version
|
|||
|
||||
The API returns the following response:
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"template_1" : {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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": [
|
||||
|
|
|
@ -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",
|
||||
|
@ -581,7 +581,7 @@ GET test/_doc/1
|
|||
// TEST[continued]
|
||||
////
|
||||
|
||||
[source,js]
|
||||
[source,console-result]
|
||||
--------------------------------------------------
|
||||
{
|
||||
"_index": "test",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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" : [
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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": [
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue