136 lines
2.9 KiB
YAML
136 lines
2.9 KiB
YAML
setup:
|
|
- do:
|
|
indices.create:
|
|
index: test_index
|
|
|
|
---
|
|
"Routing":
|
|
|
|
- do:
|
|
indices.update_aliases:
|
|
body:
|
|
actions:
|
|
- add:
|
|
index: test_index
|
|
alias: test_alias
|
|
routing: routing
|
|
|
|
- do:
|
|
indices.get_aliases:
|
|
index: test_index
|
|
|
|
- match: {test_index.aliases.test_alias: {'index_routing': 'routing', 'search_routing': 'routing'}}
|
|
|
|
---
|
|
"Index Routing":
|
|
|
|
- do:
|
|
indices.update_aliases:
|
|
body:
|
|
actions:
|
|
- add:
|
|
index: test_index
|
|
alias: test_alias
|
|
index_routing: index_routing
|
|
|
|
- do:
|
|
indices.get_aliases:
|
|
index: test_index
|
|
|
|
- match: {test_index.aliases.test_alias: {'index_routing': 'index_routing'}}
|
|
|
|
---
|
|
"Search Routing":
|
|
|
|
- do:
|
|
indices.update_aliases:
|
|
body:
|
|
actions:
|
|
- add:
|
|
index: test_index
|
|
alias: test_alias
|
|
search_routing: search_routing
|
|
|
|
- do:
|
|
indices.get_aliases:
|
|
index: test_index
|
|
|
|
- match: {test_index.aliases.test_alias: {'search_routing': 'search_routing'}}
|
|
|
|
---
|
|
"Index, Default Routing":
|
|
|
|
- do:
|
|
indices.update_aliases:
|
|
body:
|
|
actions:
|
|
- add:
|
|
index: test_index
|
|
alias: test_alias
|
|
index_routing: index_routing
|
|
routing: routing
|
|
|
|
- do:
|
|
indices.get_aliases:
|
|
index: test_index
|
|
|
|
- match: {test_index.aliases.test_alias: {'index_routing': 'index_routing', 'search_routing': 'routing'}}
|
|
|
|
---
|
|
"Search, Default Routing":
|
|
|
|
- do:
|
|
indices.update_aliases:
|
|
body:
|
|
actions:
|
|
- add:
|
|
index: test_index
|
|
alias: test_alias
|
|
search_routing: search_routing
|
|
routing: routing
|
|
|
|
- do:
|
|
indices.get_aliases:
|
|
index: test_index
|
|
|
|
- match: {test_index.aliases.test_alias: {'index_routing': 'routing', 'search_routing': 'search_routing'}}
|
|
|
|
---
|
|
"Index, Search, Default Routing":
|
|
|
|
- do:
|
|
indices.update_aliases:
|
|
body:
|
|
actions:
|
|
- add:
|
|
index: test_index
|
|
alias: test_alias
|
|
index_routing: index_routing
|
|
search_routing: search_routing
|
|
routing: routing
|
|
|
|
- do:
|
|
indices.get_aliases:
|
|
index: test_index
|
|
|
|
- match: {test_index.aliases.test_alias: {'index_routing': 'index_routing', 'search_routing': 'search_routing'}}
|
|
|
|
---
|
|
"Numeric Routing":
|
|
|
|
- do:
|
|
indices.update_aliases:
|
|
body:
|
|
actions:
|
|
- add:
|
|
index: test_index
|
|
alias: test_alias
|
|
routing: 5
|
|
|
|
- do:
|
|
indices.get_aliases:
|
|
index: test_index
|
|
|
|
- match: {test_index.aliases.test_alias: {'index_routing': '5', 'search_routing': '5'}}
|
|
|