Skip to content

Commit 6b86b86

Browse files
[DOCS] Use same index in Cluster Allocation Explain docs (#50936)
Updates several example snippets in the Cluster Allocation Explain API docs to consistently use the `my_index` index. Previously, the snippets switches from `my_index` to `idx`, which could confuse users. Co-authored-by: Emmanuel DEMEY <[email protected]> Co-authored-by: Emmanuel DEMEY <[email protected]>
1 parent b65e293 commit 6b86b86

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

docs/reference/cluster/allocation-explain.asciidoc

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,21 @@ GET /_cluster/allocation/explain
103103

104104
===== Examples of unassigned primary shard explanations
105105

106+
//////
107+
[source,console]
108+
--------------------------------------------------
109+
DELETE myindex
110+
--------------------------------------------------
111+
//////
112+
106113
[source,console]
107114
--------------------------------------------------
108-
PUT /idx?master_timeout=1s&timeout=1s
115+
PUT /my_index?master_timeout=1s&timeout=1s
109116
{"settings": {"index.routing.allocation.include._name": "non_existent_node"} }
110117
111118
GET /_cluster/allocation/explain
112119
{
113-
"index": "idx",
120+
"index": "my_index",
114121
"shard": 0,
115122
"primary": true
116123
}
@@ -122,7 +129,7 @@ The API returns the following response for an unassigned primary shard:
122129
[source,console-result]
123130
--------------------------------------------------
124131
{
125-
"index" : "idx",
132+
"index" : "my_index",
126133
"shard" : 0,
127134
"primary" : true,
128135
"current_state" : "unassigned", <1>
@@ -171,7 +178,7 @@ allocated to a node in the cluster:
171178
[source,js]
172179
--------------------------------------------------
173180
{
174-
"index" : "idx",
181+
"index" : "my_index",
175182
"shard" : 0,
176183
"primary" : true,
177184
"current_state" : "unassigned",
@@ -196,7 +203,7 @@ allocation:
196203
[source,js]
197204
--------------------------------------------------
198205
{
199-
"index" : "idx",
206+
"index" : "my_index",
200207
"shard" : 0,
201208
"primary" : false,
202209
"current_state" : "unassigned",
@@ -232,7 +239,7 @@ allocation:
232239
{
233240
"decider" : "same_shard",
234241
"decision" : "NO",
235-
"explanation" : "the shard cannot be allocated to the same node on which a copy of the shard already exists [[idx][0], node[3sULLVJrRneSg0EfBB-2Ew], [P], s[STARTED], a[id=eV9P8BN1QPqRc3B4PLx6cg]]"
242+
"explanation" : "the shard cannot be allocated to the same node on which a copy of the shard already exists [[my_index][0], node[3sULLVJrRneSg0EfBB-2Ew], [P], s[STARTED], a[id=eV9P8BN1QPqRc3B4PLx6cg]]"
236243
}
237244
]
238245
}
@@ -253,7 +260,7 @@ its current node and is required to move:
253260
[source,js]
254261
--------------------------------------------------
255262
{
256-
"index" : "idx",
263+
"index" : "my_index",
257264
"shard" : 0,
258265
"primary" : true,
259266
"current_state" : "started",
@@ -302,7 +309,7 @@ because moving the shard to another node does not form a better cluster balance:
302309
[source,js]
303310
--------------------------------------------------
304311
{
305-
"index" : "idx",
312+
"index" : "my_index",
306313
"shard" : 0,
307314
"primary" : true,
308315
"current_state" : "started",

0 commit comments

Comments
 (0)