[DOCS] Change // CONSOLE comments to [source,console] (#46440)

This commit is contained in:
James Rodewig 2019-09-09 10:45:37 -04:00 committed by GitHub
parent 2fe7a0929e
commit 5c78f606c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
167 changed files with 627 additions and 1154 deletions

View file

@ -24,7 +24,7 @@ You can execute the script by specifying its `lang` as `expert_scripts`, and the
of the script as the script source:
[source,js]
[source,console]
--------------------------------------------------
POST /_search
{
@ -53,5 +53,4 @@ POST /_search
}
}
--------------------------------------------------
// CONSOLE
// TEST[skip:we don't have an expert script plugin installed to test this]

View file

@ -42,7 +42,7 @@ Here's an example of using a script in a
<<query-dsl-function-score-query,`function_score` query>> to alter the
relevance `_score` of each document:
[source,js]
[source,console]
-------------------------------------
PUT my_index/_doc/1?refresh
{
@ -75,7 +75,6 @@ GET my_index/_search
}
}
-------------------------------------
// CONSOLE
[float]
@ -87,7 +86,7 @@ script is to use the `doc['field_name']` syntax, which retrieves the field
value from <<doc-values,doc values>>. Doc values are a columnar field value
store, enabled by default on all fields except for <<text,analyzed `text` fields>>.
[source,js]
[source,console]
-------------------------------
PUT my_index/_doc/1?refresh
{
@ -109,7 +108,6 @@ GET my_index/_search
}
}
-------------------------------
// CONSOLE
Doc-values can only return "simple" field values like numbers, dates, geo-
points, terms, etc, or arrays of these values if the field is multi-valued.
@ -170,7 +168,7 @@ doc values.
For instance:
[source,js]
[source,console]
-------------------------------
PUT my_index
{
@ -216,7 +214,7 @@ GET my_index/_search
}
}
-------------------------------
// CONSOLE
<1> The `title` field is not stored and so cannot be used with the `_fields[]` syntax.
<2> The `title` field can still be accessed from the `_source`.

View file

@ -20,7 +20,7 @@ the same pattern:
For example, the following script is used in a search request to return a
<<request-body-search-script-fields, scripted field>>:
[source,js]
[source,console]
-------------------------------------
PUT my_index/_doc/1
{
@ -42,7 +42,6 @@ GET my_index/_search
}
}
-------------------------------------
// CONSOLE
[float]
=== Script parameters
@ -144,7 +143,7 @@ The following are examples of using a stored script that lives at
First, create the script called `calculate-score` in the cluster state:
[source,js]
[source,console]
-----------------------------------
POST _scripts/calculate-score
{
@ -154,20 +153,18 @@ POST _scripts/calculate-score
}
}
-----------------------------------
// CONSOLE
This same script can be retrieved with:
[source,js]
[source,console]
-----------------------------------
GET _scripts/calculate-score
-----------------------------------
// CONSOLE
// TEST[continued]
Stored scripts can be used by specifying the `id` parameters as follows:
[source,js]
[source,console]
--------------------------------------------------
GET _search
{
@ -183,16 +180,14 @@ GET _search
}
}
--------------------------------------------------
// CONSOLE
// TEST[continued]
And deleted with:
[source,js]
[source,console]
-----------------------------------
DELETE _scripts/calculate-score
-----------------------------------
// CONSOLE
// TEST[continued]
[float]