Skip to content

Commit 8ecc060

Browse files
authored
[DOCS] Update my-index examples (#60132) (#60250)
Changes the following example index names to `my-index-000001` for consistency: * `my-index` * `my_index` * `myindex`
1 parent 1f970a5 commit 8ecc060

File tree

147 files changed

+611
-610
lines changed

Some content is hidden

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

147 files changed

+611
-610
lines changed

docs/painless/painless-guide/painless-execute-script.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ index:: The name of an index containing a mapping that is compatible with the do
6969

7070
[source,console]
7171
----------------------------------------------------------------
72-
PUT /my-index
72+
PUT /my-index-000001
7373
{
7474
"mappings": {
7575
"properties": {
@@ -90,7 +90,7 @@ POST /_scripts/painless/_execute
9090
},
9191
"context": "filter",
9292
"context_setup": {
93-
"index": "my-index",
93+
"index": "my-index-000001",
9494
"document": {
9595
"field": "four"
9696
}
@@ -123,7 +123,7 @@ query:: If `_score` is used in the script then a query can specify that it will
123123

124124
[source,console]
125125
----------------------------------------------------------------
126-
PUT /my-index
126+
PUT /my-index-000001
127127
{
128128
"mappings": {
129129
"properties": {
@@ -148,7 +148,7 @@ POST /_scripts/painless/_execute
148148
},
149149
"context": "score",
150150
"context_setup": {
151-
"index": "my-index",
151+
"index": "my-index-000001",
152152
"document": {
153153
"rank": 4
154154
}

docs/plugins/analysis-icu.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ Below is an example of how to set up a field for sorting German names in
348348

349349
[source,console]
350350
--------------------------
351-
PUT my_index
351+
PUT my-index-000001
352352
{
353353
"mappings": {
354354
"properties": {
@@ -368,7 +368,7 @@ PUT my_index
368368
}
369369
}
370370
371-
GET /my_index/_search <3>
371+
GET /my-index-000001/_search <3>
372372
{
373373
"query": {
374374
"match": {

docs/plugins/ingest-attachment.asciidoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ PUT _ingest/pipeline/attachment
4545
}
4646
]
4747
}
48-
PUT my_index/_doc/my_id?pipeline=attachment
48+
PUT my-index-00001/_doc/my_id?pipeline=attachment
4949
{
5050
"data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0="
5151
}
52-
GET my_index/_doc/my_id
52+
GET my-index-00001/_doc/my_id
5353
--------------------------------------------------
5454

5555
Returns this:
@@ -58,7 +58,7 @@ Returns this:
5858
--------------------------------------------------
5959
{
6060
"found": true,
61-
"_index": "my_index",
61+
"_index": "my-index-00001",
6262
"_type": "_doc",
6363
"_id": "my_id",
6464
"_version": 1,
@@ -128,11 +128,11 @@ PUT _ingest/pipeline/attachment
128128
}
129129
]
130130
}
131-
PUT my_index/_doc/my_id?pipeline=attachment
131+
PUT my-index-00001/_doc/my_id?pipeline=attachment
132132
{
133133
"data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0="
134134
}
135-
GET my_index/_doc/my_id
135+
GET my-index-00001/_doc/my_id
136136
--------------------------------------------------
137137

138138
Returns this:
@@ -141,7 +141,7 @@ Returns this:
141141
--------------------------------------------------
142142
{
143143
"found": true,
144-
"_index": "my_index",
144+
"_index": "my-index-00001",
145145
"_type": "_doc",
146146
"_id": "my_id",
147147
"_version": 1,
@@ -176,12 +176,12 @@ PUT _ingest/pipeline/attachment
176176
}
177177
]
178178
}
179-
PUT my_index/_doc/my_id_2?pipeline=attachment
179+
PUT my-index-00001/_doc/my_id_2?pipeline=attachment
180180
{
181181
"data": "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",
182182
"max_size": 5
183183
}
184-
GET my_index/_doc/my_id_2
184+
GET my-index-00001/_doc/my_id_2
185185
--------------------------------------------------
186186

187187
Returns this:
@@ -190,7 +190,7 @@ Returns this:
190190
--------------------------------------------------
191191
{
192192
"found": true,
193-
"_index": "my_index",
193+
"_index": "my-index-00001",
194194
"_type": "_doc",
195195
"_id": "my_id_2",
196196
"_version": 1,
@@ -262,7 +262,7 @@ PUT _ingest/pipeline/attachment
262262
}
263263
]
264264
}
265-
PUT my_index/_doc/my_id?pipeline=attachment
265+
PUT my-index-00001/_doc/my_id?pipeline=attachment
266266
{
267267
"attachments" : [
268268
{
@@ -275,15 +275,15 @@ PUT my_index/_doc/my_id?pipeline=attachment
275275
}
276276
]
277277
}
278-
GET my_index/_doc/my_id
278+
GET my-index-00001/_doc/my_id
279279
--------------------------------------------------
280280

281281
Returns this:
282282

283283
[source,console-result]
284284
--------------------------------------------------
285285
{
286-
"_index" : "my_index",
286+
"_index" : "my-index-00001",
287287
"_type" : "_doc",
288288
"_id" : "my_id",
289289
"_version" : 1,

docs/plugins/mapper-annotated-text.asciidoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ the search index:
2424

2525
[source,console]
2626
--------------------------
27-
PUT my_index
27+
PUT my-index-000001
2828
{
2929
"mappings": {
3030
"properties": {
@@ -47,7 +47,7 @@ in the search index:
4747

4848
[source,js]
4949
--------------------------
50-
GET my_index/_analyze
50+
GET my-index-000001/_analyze
5151
{
5252
"field": "my_field",
5353
"text":"Investors in [Apple](Apple+Inc.) rejoiced."
@@ -112,18 +112,18 @@ in this example where a search for `Beck` will not match `Jeff Beck` :
112112
[source,console]
113113
--------------------------
114114
# Example documents
115-
PUT my_index/_doc/1
115+
PUT my-index-000001/_doc/1
116116
{
117117
"my_field": "[Beck](Beck) announced a new tour"<1>
118118
}
119119
120-
PUT my_index/_doc/2
120+
PUT my-index-000001/_doc/2
121121
{
122122
"my_field": "[Jeff Beck](Jeff+Beck&Guitarist) plays a strat"<2>
123123
}
124124
125125
# Example search
126-
GET my_index/_search
126+
GET my-index-000001/_search
127127
{
128128
"query": {
129129
"term": {
@@ -164,7 +164,7 @@ sense to include them in dedicated structured fields to support discovery via ag
164164

165165
[source,console]
166166
--------------------------
167-
PUT my_index
167+
PUT my-index-000001
168168
{
169169
"mappings": {
170170
"properties": {
@@ -189,13 +189,13 @@ Applications would then typically provide content and discover it as follows:
189189
[source,console]
190190
--------------------------
191191
# Example documents
192-
PUT my_index/_doc/1
192+
PUT my-index-000001/_doc/1
193193
{
194194
"my_unstructured_text_field": "[Shay](%40kimchy) created elasticsearch",
195195
"my_twitter_handles": ["@kimchy"] <1>
196196
}
197197
198-
GET my_index/_search
198+
GET my-index-000001/_search
199199
{
200200
"query": {
201201
"query_string": {
@@ -264,12 +264,12 @@ in a way which is respectful of the original markup:
264264
[source,console]
265265
--------------------------
266266
# Example documents
267-
PUT my_index/_doc/1
267+
PUT my-index-000001/_doc/1
268268
{
269269
"my_field": "The cat sat on the [mat](sku3578)"
270270
}
271271
272-
GET my_index/_search
272+
GET my-index-000001/_search
273273
{
274274
"query": {
275275
"query_string": {

docs/plugins/mapper-murmur3.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ value and its hash are stored in the index:
1616

1717
[source,console]
1818
--------------------------
19-
PUT my_index
19+
PUT my-index-000001
2020
{
2121
"mappings": {
2222
"properties": {
@@ -40,17 +40,17 @@ of the values of the `my_field` field. This is only useful in order to run
4040
[source,console]
4141
--------------------------
4242
# Example documents
43-
PUT my_index/_doc/1
43+
PUT my-index-000001/_doc/1
4444
{
4545
"my_field": "This is a document"
4646
}
4747
48-
PUT my_index/_doc/2
48+
PUT my-index-000001/_doc/2
4949
{
5050
"my_field": "This is another document"
5151
}
5252
53-
GET my_index/_search
53+
GET my-index-000001/_search
5454
{
5555
"aggs": {
5656
"my_field_cardinality": {

docs/plugins/mapper-size.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ In order to enable the `_size` field, set the mapping as follows:
1515

1616
[source,console]
1717
--------------------------
18-
PUT my_index
18+
PUT my-index-000001
1919
{
2020
"mappings": {
2121
"_size": {
@@ -31,17 +31,17 @@ and when sorting:
3131
[source,console]
3232
--------------------------
3333
# Example documents
34-
PUT my_index/_doc/1
34+
PUT my-index-000001/_doc/1
3535
{
3636
"text": "This is a document"
3737
}
3838
39-
PUT my_index/_doc/2
39+
PUT my-index-000001/_doc/2
4040
{
4141
"text": "This is another document"
4242
}
4343
44-
GET my_index/_search
44+
GET my-index-000001/_search
4545
{
4646
"query": {
4747
"range": {

docs/plugins/store-smb.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ It can also be set on a per-index basis at index creation time:
4646

4747
[source,console]
4848
----
49-
PUT my_index
49+
PUT my-index-000001
5050
{
5151
"settings": {
5252
"index.store.type": "smb_mmap_fs"

docs/python/index.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ Simple use-case:
7878
>>> es = Elasticsearch()
7979
8080
# datetimes will be serialized
81-
>>> es.index(index="my-index", doc_type="test-type", id=42, body={"any": "data", "timestamp": datetime.now()})
82-
{u'_id': u'42', u'_index': u'my-index', u'_type': u'test-type', u'_version': 1, u'ok': True}
81+
>>> es.index(index="my-index-000001", doc_type="test-type", id=42, body={"any": "data", "timestamp": datetime.now()})
82+
{u'_id': u'42', u'_index': u'my-index-000001', u'_type': u'test-type', u'_version': 1, u'ok': True}
8383
8484
# but not deserialized
85-
>>> es.get(index="my-index", doc_type="test-type", id=42)['_source']
85+
>>> es.get(index="my-index-000001", doc_type="test-type", id=42)['_source']
8686
{u'any': u'data', u'timestamp': u'2013-05-12T19:45:31.804229'}
8787
------------------------------------
8888

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,22 +119,22 @@ Consider the following example:
119119

120120
[source,console]
121121
---------------------------------
122-
PUT my_index/log/1?refresh
122+
PUT my-index-00001/log/1?refresh
123123
{
124124
"date": "2015-10-01T00:30:00Z"
125125
}
126126
127-
PUT my_index/log/2?refresh
127+
PUT my-index-00001/log/2?refresh
128128
{
129129
"date": "2015-10-01T01:30:00Z"
130130
}
131131
132-
PUT my_index/log/3?refresh
132+
PUT my-index-00001/log/3?refresh
133133
{
134134
"date": "2015-10-01T02:30:00Z"
135135
}
136136
137-
GET my_index/_search?size=0
137+
GET my-index-00001/_search?size=0
138138
{
139139
"aggs": {
140140
"by_day": {
@@ -185,7 +185,7 @@ midnight UTC:
185185

186186
[source,console]
187187
---------------------------------
188-
GET my_index/_search?size=0
188+
GET my-index-00001/_search?size=0
189189
{
190190
"aggs": {
191191
"by_day": {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,17 +293,17 @@ include::datehistogram-aggregation.asciidoc[tag=offset-explanation]
293293

294294
[source,console,id=composite-aggregation-datehistogram-offset-example]
295295
----
296-
PUT my_index/_doc/1?refresh
296+
PUT my-index-000001/_doc/1?refresh
297297
{
298298
"date": "2015-10-01T05:30:00Z"
299299
}
300300
301-
PUT my_index/_doc/2?refresh
301+
PUT my-index-000001/_doc/2?refresh
302302
{
303303
"date": "2015-10-01T06:30:00Z"
304304
}
305305
306-
GET my_index/_search?size=0
306+
GET my-index-000001/_search?size=0
307307
{
308308
"aggs": {
309309
"my_buckets": {

0 commit comments

Comments
 (0)