OpenSearch/rest-api-spec/test/indices.put_template/10_basic.yaml

42 lines
1013 B
YAML
Raw Normal View History

2013-07-20 15:12:27 -04:00
---
"Put template":
2013-07-20 15:12:27 -04:00
- do:
indices.put_template:
name: test
body:
template: test-*
settings:
2013-07-20 15:12:27 -04:00
number_of_shards: 1
number_of_replicas: 0
- do:
indices.get_template:
name: test
- match: {test.template: "test-*"}
- match: {test.settings: {index.number_of_shards: '1', index.number_of_replicas: '0'}}
---
"Put template with aliases":
- do:
indices.put_template:
name: test
body:
template: test-*
aliases:
test_alias: {}
test_blias: { routing: b }
test_clias: { filter: { term: { user: kimchy }}}
- do:
indices.get_template:
name: test
- match: { test.template: "test-*" }
- length: { test.aliases: 3 }
- is_true: test.aliases.test_alias
- match: { test.aliases.test_blias.index_routing: "b" }
- match: { test.aliases.test_blias.search_routing: "b" }
- match: { test.aliases.test_clias.filter.term.user: "kimchy" }