-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding number of routing shards to index settings before passing into…
… GetSettingsResponse Signed-off-by: Sophia <[email protected]>
- Loading branch information
Sophia
committed
Jun 21, 2024
1 parent
f8e8865
commit 24a4ecb
Showing
3 changed files
with
95 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
169 changes: 88 additions & 81 deletions
169
rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_settings/10_basic.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,173 +1,180 @@ | ||
--- | ||
setup: | ||
- do: | ||
indices.create: | ||
index: test_1 | ||
body: | ||
settings: | ||
number_of_shards: 5 | ||
number_of_replicas: 1 | ||
indices.create: | ||
index: test_1 | ||
body: | ||
settings: | ||
number_of_shards: 5 | ||
number_of_replicas: 1 | ||
- do: | ||
indices.create: | ||
index: test_2 | ||
body: | ||
settings: | ||
number_of_shards: 3 | ||
number_of_replicas: 0 | ||
indices.create: | ||
index: test_2 | ||
body: | ||
settings: | ||
number_of_shards: 3 | ||
number_of_replicas: 0 | ||
number_of_routing_shards: 6 | ||
|
||
--- | ||
"Get /_settings": | ||
|
||
- do: | ||
indices.get_settings: {} | ||
- do: | ||
indices.get_settings: {} | ||
|
||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_1.settings.index.number_of_replicas: "1"} | ||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- match: { test_2.settings.index.number_of_replicas: "0"} | ||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_1.settings.index.number_of_replicas: "1"} | ||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- match: { test_2.settings.index.number_of_replicas: "0"} | ||
- match: { test_2.settings.index.number_of_routing_shards: "0"} | ||
|
||
--- | ||
"Get /{index}/_settings": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
index: test_1 | ||
|
||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_1.settings.index.number_of_replicas: "1"} | ||
- is_false: test_2 | ||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_1.settings.index.number_of_replicas: "1"} | ||
- is_false: test_2 | ||
|
||
|
||
--- | ||
"Get /{index}/_settings/_all": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
index: test_1 | ||
name: _all | ||
|
||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_1.settings.index.number_of_replicas: "1"} | ||
- is_false: test_2 | ||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_1.settings.index.number_of_replicas: "1"} | ||
- is_false: test_2 | ||
|
||
--- | ||
"Get /{index}/_settings/*": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
index: test_1 | ||
name: '*' | ||
|
||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_1.settings.index.number_of_replicas: "1"} | ||
- is_false: test_2 | ||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_1.settings.index.number_of_replicas: "1"} | ||
- is_false: test_2 | ||
|
||
--- | ||
"Get /{index}/_settings/{name}": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
index: test_1 | ||
name: index.number_of_shards | ||
|
||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2 | ||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2 | ||
|
||
--- | ||
"Get /{index}/_settings/{name,name}": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
index: test_1 | ||
name: index.number_of_shards,index.number_of_replicas | ||
|
||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_1.settings.index.number_of_replicas: "1"} | ||
- is_false: test_2 | ||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_1.settings.index.number_of_replicas: "1"} | ||
- is_false: test_2 | ||
|
||
--- | ||
"Get /{index}/_settings/{name*}": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
index: test_1 | ||
name: 'index.number_of_s*' | ||
|
||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2 | ||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2 | ||
|
||
--- | ||
"Get /_settings/{name}": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
name: index.number_of_shards | ||
|
||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_replicas | ||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_routing_shards | ||
|
||
--- | ||
"Get /_all/_settings/{name}": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
index: _all | ||
name: index.number_of_shards | ||
|
||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_replicas | ||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_routing_shards | ||
|
||
|
||
--- | ||
"Get /*/_settings/{name}": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
index: '*' | ||
name: index.number_of_shards | ||
|
||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_replicas | ||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_routing_shards | ||
|
||
--- | ||
"Get /index,index/_settings/{name}": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
index: test_1,test_2 | ||
name: index.number_of_shards | ||
|
||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_replicas | ||
- match: { test_1.settings.index.number_of_shards: "5"} | ||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- is_false: test_1.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_routing_shards | ||
|
||
--- | ||
"Get /index*/_settings/{name}": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
index: '*2' | ||
name: index.number_of_shards | ||
|
||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- is_false: test_1 | ||
- is_false: test_2.settings.index.number_of_replicas | ||
- match: { test_2.settings.index.number_of_shards: "3"} | ||
- is_false: test_1 | ||
- is_false: test_2.settings.index.number_of_replicas | ||
- is_false: test_2.settings.index.number_of_routing_shards | ||
|
||
--- | ||
"Get /_settings with local flag": | ||
|
||
- do: | ||
indices.get_settings: | ||
- do: | ||
indices.get_settings: | ||
local: true | ||
|
||
- is_true: test_1 | ||
- is_true: test_2 | ||
- is_true: test_1 | ||
- is_true: test_2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters