Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] [4 of 5] Change // CONSOLE comments to [source,console] #46441

Merged
merged 1 commit into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/plugins/repository-azure.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The settings have the form `azure.client.CLIENT_NAME.SETTING_NAME`. By default,
the <<repository-azure-repository-settings,repository setting>> `client`.
For example:

[source,js]
[source,console]
----
PUT _snapshot/my_backup
{
Expand All @@ -64,7 +64,6 @@ PUT _snapshot/my_backup
}
}
----
// CONSOLE
// TEST[skip:we don't have azure setup while testing this]

Most client settings can be added to the `elasticsearch.yml` configuration file.
Expand Down
9 changes: 3 additions & 6 deletions docs/reference/index-modules/allocation/filtering.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,27 @@ For example, to tell {es} to allocate shards from the `test` index to either
`big` or `medium` nodes, use `index.routing.allocation.include`:
+
--
[source,js]
[source,console]
------------------------
PUT test/_settings
{
"index.routing.allocation.include.size": "big,medium"
}
------------------------
// CONSOLE
// TEST[s/^/PUT test\n/]

If you specify multiple filters, all conditions must be satisfied for shards to
be relocated. For example, to move the `test` index to `big` nodes in `rack1`,
you could specify:

[source,js]
[source,console]
------------------------
PUT test/_settings
{
"index.routing.allocation.include.size": "big",
"index.routing.allocation.include.rack": "rack1"
}
------------------------
// CONSOLE
// TEST[s/^/PUT test\n/]
--

Expand Down Expand Up @@ -106,12 +104,11 @@ The index allocation settings support the following built-in attributes:

You can use wildcards when specifying attribute values, for example:

[source,js]
[source,console]
------------------------
PUT test/_settings
{
"index.routing.allocation.include._ip": "192.168.2.*"
}
------------------------
// CONSOLE
// TEST[skip:indexes don't assign]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This means that, by default, newer indices will be recovered before older indice
Use the per-index dynamically updatable `index.priority` setting to customise
the index prioritization order. For instance:

[source,js]
[source,console]
------------------------------
PUT index_1

Expand All @@ -33,7 +33,6 @@ PUT index_4
}
}
------------------------------
// CONSOLE

In the above example:

Expand All @@ -45,12 +44,11 @@ In the above example:
This setting accepts an integer, and can be updated on a live index with the
<<indices-update-settings,update index settings API>>:

[source,js]
[source,console]
------------------------------
PUT index_4/_settings
{
"index.priority": 1
}
------------------------------
// CONSOLE
// TEST[continued]
15 changes: 5 additions & 10 deletions docs/reference/index-modules/index-sorting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ An error will be thrown if index sorting is activated on an index that contains

For instance the following example shows how to define a sort on a single field:

[source,js]
[source,console]
--------------------------------------------------
PUT twitter
{
Expand All @@ -31,14 +31,13 @@ PUT twitter
}
}
--------------------------------------------------
// CONSOLE

<1> This index is sorted by the `date` field
<2> ... in descending order.

It is also possible to sort the index by more than one field:

[source,js]
[source,console]
--------------------------------------------------
PUT twitter
{
Expand All @@ -61,7 +60,6 @@ PUT twitter
}
}
--------------------------------------------------
// CONSOLE

<1> This index is sorted by `username` first then by `date`
<2> ... in ascending order for the `username` field and in descending order for the `date` field.
Expand Down Expand Up @@ -112,7 +110,7 @@ Though when the index sort and the search sort are the same it is possible to li
the number of documents that should be visited per segment to retrieve the N top ranked documents globally.
For example, let's say we have an index that contains events sorted by a timestamp field:

[source,js]
[source,console]
--------------------------------------------------
PUT events
{
Expand All @@ -131,13 +129,12 @@ PUT events
}
}
--------------------------------------------------
// CONSOLE

<1> This index is sorted by timestamp in descending order (most recent first)

You can search for the last 10 events with:

[source,js]
[source,console]
--------------------------------------------------
GET /events/_search
{
Expand All @@ -147,7 +144,6 @@ GET /events/_search
]
}
--------------------------------------------------
// CONSOLE
// TEST[continued]

Elasticsearch will detect that the top docs of each segment are already sorted in the index
Expand All @@ -159,7 +155,7 @@ If you're only looking for the last 10 events and have no interest in
the total number of documents that match the query you can set `track_total_hits`
to false:

[source,js]
[source,console]
--------------------------------------------------
GET /events/_search
{
Expand All @@ -170,7 +166,6 @@ GET /events/_search
"track_total_hits": false
}
--------------------------------------------------
// CONSOLE
// TEST[continued]

<1> The index sort will be used to rank the top documents and each segment will early terminate the collection after the first 10 matches.
Expand Down
21 changes: 7 additions & 14 deletions docs/reference/index-modules/similarity.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ can be configured via the index settings as shown below. The index
options can be provided when creating an index or updating index
settings.

[source,js]
[source,console]
--------------------------------------------------
PUT /index
{
Expand All @@ -37,12 +37,11 @@ PUT /index
}
}
--------------------------------------------------
// CONSOLE

Here we configure the DFRSimilarity so it can be referenced as
`my_similarity` in mappings as is illustrate in the below example:

[source,js]
[source,console]
--------------------------------------------------
PUT /index/_mapping
{
Expand All @@ -51,7 +50,6 @@ PUT /index/_mapping
}
}
--------------------------------------------------
// CONSOLE
// TEST[continued]

[float]
Expand Down Expand Up @@ -190,7 +188,7 @@ A similarity that allows you to use a script in order to specify how scores
should be computed. For instance, the below example shows how to reimplement
TF-IDF:

[source,js]
[source,console]
--------------------------------------------------
PUT /index
{
Expand Down Expand Up @@ -237,7 +235,6 @@ GET /index/_search?explain=true
}
}
--------------------------------------------------
// CONSOLE

Which yields:

Expand Down Expand Up @@ -357,7 +354,7 @@ document-independent contribution to the score.
The below configuration will give the same tf-idf scores but is slightly
more efficient:

[source,js]
[source,console]
--------------------------------------------------
PUT /index
{
Expand Down Expand Up @@ -385,11 +382,10 @@ PUT /index
}
}
--------------------------------------------------
// CONSOLE

////////////////////

[source,js]
[source,console]
--------------------------------------------------
PUT /index/_doc/1
{
Expand All @@ -413,7 +409,6 @@ GET /index/_search?explain=true
}
}
--------------------------------------------------
// CONSOLE
// TEST[continued]

[source,js]
Expand Down Expand Up @@ -523,7 +518,7 @@ By default, Elasticsearch will use whatever similarity is configured as
You can change the default similarity for all fields in an index when
it is <<indices-create-index,created>>:

[source,js]
[source,console]
--------------------------------------------------
PUT /index
{
Expand All @@ -538,13 +533,12 @@ PUT /index
}
}
--------------------------------------------------
// CONSOLE

If you want to change the default similarity after creating the index
you must <<indices-open-close,close>> your index, send the following
request and <<indices-open-close,open>> it again afterwards:

[source,js]
[source,console]
--------------------------------------------------
POST /index/_close

Expand All @@ -561,5 +555,4 @@ PUT /index/_settings

POST /index/_open
--------------------------------------------------
// CONSOLE
// TEST[continued]
6 changes: 2 additions & 4 deletions docs/reference/index-modules/slowlog.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ index.search.slowlog.level: info
All of the above settings are _dynamic_ and can be set for each index using the
<<indices-update-settings, update indices settings>> API. For example:

[source,js]
[source,console]
--------------------------------------------------
PUT /twitter/_settings
{
Expand All @@ -44,7 +44,6 @@ PUT /twitter/_settings
"index.search.slowlog.level": "info"
}
--------------------------------------------------
// CONSOLE
// TEST[setup:twitter]

By default, none are enabled (set to `-1`). Levels (`warn`, `info`,
Expand Down Expand Up @@ -140,7 +139,7 @@ index.indexing.slowlog.source: 1000
All of the above settings are _dynamic_ and can be set for each index using the
<<indices-update-settings, update indices settings>> API. For example:

[source,js]
[source,console]
--------------------------------------------------
PUT /twitter/_settings
{
Expand All @@ -152,7 +151,6 @@ PUT /twitter/_settings
"index.indexing.slowlog.source": "1000"
}
--------------------------------------------------
// CONSOLE
// TEST[setup:twitter]

By default Elasticsearch will log the first 1000 characters of the _source in
Expand Down
6 changes: 2 additions & 4 deletions docs/reference/index-modules/store.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ index.store.type: niofs
It is a _static_ setting that can be set on a per-index basis at index
creation time:

[source,js]
[source,console]
---------------------------------
PUT /my_index
{
Expand All @@ -31,7 +31,6 @@ PUT /my_index
}
}
---------------------------------
// CONSOLE

WARNING: This is an expert-only setting and may be removed in the future.

Expand Down Expand Up @@ -112,7 +111,7 @@ index.store.preload: ["nvd", "dvd"]

or in the index settings at index creation time:

[source,js]
[source,console]
---------------------------------
PUT /my_index
{
Expand All @@ -121,7 +120,6 @@ PUT /my_index
}
}
---------------------------------
// CONSOLE

The default value is the empty array, which means that nothing will be loaded
into the file-system cache eagerly. For indices that are actively searched,
Expand Down
Loading