Skip to content

Commit 1f36c4e

Browse files
authored
[DOCS] Replace "// CONSOLE" comments with [source,console] (#46159) (#46332)
1 parent d5597c9 commit 1f36c4e

File tree

80 files changed

+318
-595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+318
-595
lines changed

docs/reference/administering/backup-and-restore-security-config.asciidoc

+5-10
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ It is preferable to have a <<backup-security-repos, dedicated repository>> for
7575
this special index. If you wish, you can also snapshot the system indices for other {stack} components to this repository.
7676
+
7777
--
78-
[source,js]
78+
[source,console]
7979
-----------------------------------
8080
PUT /_snapshot/my_backup
8181
{
@@ -85,7 +85,6 @@ PUT /_snapshot/my_backup
8585
}
8686
}
8787
-----------------------------------
88-
// CONSOLE
8988

9089
The user calling this API must have the elevated `manage` cluster privilege to
9190
prevent non-administrators exfiltrating data.
@@ -99,15 +98,14 @@ The following example creates a new user `snapshot_user` in the
9998
{stack-ov}/native-realm.html[native realm], but it is not important which
10099
realm the user is a member of:
101100

102-
[source,js]
101+
[source,console]
103102
--------------------------------------------------
104103
POST /_security/user/snapshot_user
105104
{
106105
"password" : "secret",
107106
"roles" : [ "snapshot_user" ]
108107
}
109108
--------------------------------------------------
110-
// CONSOLE
111109
// TEST[skip:security is not enabled in this fixture]
112110

113111
--
@@ -118,15 +116,14 @@ POST /_security/user/snapshot_user
118116
The following example shows how to use the create snapshot API to backup
119117
the `.security` index to the `my_backup` repository:
120118

121-
[source,js]
119+
[source,console]
122120
--------------------------------------------------
123121
PUT /_snapshot/my_backup/snapshot_1
124122
{
125123
"indices": ".security",
126124
"include_global_state": true <1>
127125
}
128126
--------------------------------------------------
129-
// CONSOLE
130127
// TEST[continued]
131128

132129
<1> This parameter value captures all the persistent settings stored in the
@@ -189,18 +186,16 @@ the {security-features}.
189186
To restore your security configuration from a backup, first make sure that the
190187
repository holding `.security` snapshots is installed:
191188

192-
[source,js]
189+
[source,console]
193190
--------------------------------------------------
194191
GET /_snapshot/my_backup
195192
--------------------------------------------------
196-
// CONSOLE
197193
// TEST[continued]
198194

199-
[source,js]
195+
[source,console]
200196
--------------------------------------------------
201197
GET /_snapshot/my_backup/snapshot_1
202198
--------------------------------------------------
203-
// CONSOLE
204199
// TEST[continued]
205200

206201
Then log into one of the node hosts, navigate to {es} installation directory,

docs/reference/aggregations/bucket/adjacency-matrix-aggregation.asciidoc

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ other than the default of the ampersand.
2828

2929
Example:
3030

31-
[source,js]
31+
[source,console]
3232
--------------------------------------------------
3333
PUT /emails/_bulk?refresh
3434
{ "index" : { "_id" : 1 } }
@@ -54,7 +54,6 @@ GET emails/_search
5454
}
5555
}
5656
--------------------------------------------------
57-
// CONSOLE
5857

5958
In the above example, we analyse email messages to see which groups of individuals
6059
have exchanged messages.

docs/reference/aggregations/bucket/autodatehistogram-aggregation.asciidoc

+6-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The buckets field is optional, and will default to 10 buckets if not specified.
1010

1111
Requesting a target of 10 buckets.
1212

13-
[source,js]
13+
[source,console]
1414
--------------------------------------------------
1515
POST /sales/_search?size=0
1616
{
@@ -24,7 +24,6 @@ POST /sales/_search?size=0
2424
}
2525
}
2626
--------------------------------------------------
27-
// CONSOLE
2827
// TEST[setup:sales]
2928

3029
==== Keys
@@ -37,7 +36,7 @@ date string using the format specified with the `format` parameter:
3736
TIP: If no `format` is specified, then it will use the first date
3837
<<mapping-date-format,format>> specified in the field mapping.
3938

40-
[source,js]
39+
[source,console]
4140
--------------------------------------------------
4241
POST /sales/_search?size=0
4342
{
@@ -52,7 +51,6 @@ POST /sales/_search?size=0
5251
}
5352
}
5453
--------------------------------------------------
55-
// CONSOLE
5654
// TEST[setup:sales]
5755

5856
<1> Supports expressive date <<date-format-pattern,format pattern>>
@@ -119,7 +117,7 @@ Time zones may either be specified as an ISO 8601 UTC offset (e.g. `+01:00` or
119117

120118
Consider the following example:
121119

122-
[source,js]
120+
[source,console]
123121
---------------------------------
124122
PUT my_index/log/1?refresh
125123
{
@@ -148,7 +146,6 @@ GET my_index/_search?size=0
148146
}
149147
}
150148
---------------------------------
151-
// CONSOLE
152149

153150
UTC is used if no time zone is specified, three 1-hour buckets are returned
154151
starting at midnight UTC on 1 October 2015:
@@ -186,7 +183,7 @@ starting at midnight UTC on 1 October 2015:
186183
If a `time_zone` of `-01:00` is specified, then midnight starts at one hour before
187184
midnight UTC:
188185

189-
[source,js]
186+
[source,console]
190187
---------------------------------
191188
GET my_index/_search?size=0
192189
{
@@ -201,7 +198,6 @@ GET my_index/_search?size=0
201198
}
202199
}
203200
---------------------------------
204-
// CONSOLE
205201
// TEST[continued]
206202

207203

@@ -273,7 +269,7 @@ The accepted units for `minimum_interval` are:
273269
* minute
274270
* second
275271

276-
[source,js]
272+
[source,console]
277273
--------------------------------------------------
278274
POST /sales/_search?size=0
279275
{
@@ -288,7 +284,6 @@ POST /sales/_search?size=0
288284
}
289285
}
290286
--------------------------------------------------
291-
// CONSOLE
292287
// TEST[setup:sales]
293288

294289
==== Missing value
@@ -297,7 +292,7 @@ The `missing` parameter defines how documents that are missing a value should be
297292
By default they will be ignored but it is also possible to treat them as if they
298293
had a value.
299294

300-
[source,js]
295+
[source,console]
301296
--------------------------------------------------
302297
POST /sales/_search?size=0
303298
{
@@ -312,7 +307,6 @@ POST /sales/_search?size=0
312307
}
313308
}
314309
--------------------------------------------------
315-
// CONSOLE
316310
// TEST[setup:sales]
317311

318312
<1> Documents without a value in the `publish_date` field will fall into the same bucket as documents that have the value `2000-01-01`.

docs/reference/aggregations/bucket/children-aggregation.asciidoc

+4-8
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This aggregation has a single option:
99

1010
For example, let's say we have an index of questions and answers. The answer type has the following `join` field in the mapping:
1111

12-
[source,js]
12+
[source,console]
1313
--------------------------------------------------
1414
PUT child_example
1515
{
@@ -25,15 +25,14 @@ PUT child_example
2525
}
2626
}
2727
--------------------------------------------------
28-
// CONSOLE
2928

3029
The `question` document contain a tag field and the `answer` documents contain an owner field. With the `children`
3130
aggregation the tag buckets can be mapped to the owner buckets in a single request even though the two fields exist in
3231
two different kinds of documents.
3332

3433
An example of a question document:
3534

36-
[source,js]
35+
[source,console]
3736
--------------------------------------------------
3837
PUT child_example/_doc/1
3938
{
@@ -49,12 +48,11 @@ PUT child_example/_doc/1
4948
]
5049
}
5150
--------------------------------------------------
52-
// CONSOLE
5351
// TEST[continued]
5452

5553
Examples of `answer` documents:
5654

57-
[source,js]
55+
[source,console]
5856
--------------------------------------------------
5957
PUT child_example/_doc/2?routing=1
6058
{
@@ -86,12 +84,11 @@ PUT child_example/_doc/3?routing=1&refresh
8684
"creation_date": "2009-05-05T13:45:37.030"
8785
}
8886
--------------------------------------------------
89-
// CONSOLE
9087
// TEST[continued]
9188

9289
The following request can be built that connects the two together:
9390

94-
[source,js]
91+
[source,console]
9592
--------------------------------------------------
9693
POST child_example/_search?size=0
9794
{
@@ -120,7 +117,6 @@ POST child_example/_search?size=0
120117
}
121118
}
122119
--------------------------------------------------
123-
// CONSOLE
124120
// TEST[continued]
125121

126122
<1> The `type` points to type / mapping with the name `answer`.

0 commit comments

Comments
 (0)