2014-01-17 10:39:18 -05:00
|
|
|
setup:
|
2013-09-18 09:29:21 -04:00
|
|
|
- do:
|
|
|
|
indices.put_template:
|
|
|
|
name: test
|
|
|
|
body:
|
|
|
|
template: test-*
|
|
|
|
settings:
|
|
|
|
number_of_shards: 1
|
|
|
|
number_of_replicas: 0
|
|
|
|
|
2014-01-17 10:39:18 -05:00
|
|
|
---
|
|
|
|
"Get template":
|
|
|
|
|
2013-09-18 09:29:21 -04:00
|
|
|
- do:
|
|
|
|
indices.get_template:
|
|
|
|
name: test
|
|
|
|
|
|
|
|
- match: {test.template: "test-*"}
|
2014-07-02 02:42:31 -04:00
|
|
|
- match: {test.settings: {index: {number_of_shards: '1', number_of_replicas: '0'}}}
|
|
|
|
|
2013-10-08 12:18:20 -04:00
|
|
|
---
|
|
|
|
"Get all templates":
|
2013-10-09 07:11:00 -04:00
|
|
|
|
2013-10-08 12:18:20 -04:00
|
|
|
- do:
|
|
|
|
indices.put_template:
|
|
|
|
name: test2
|
|
|
|
body:
|
|
|
|
template: test2-*
|
|
|
|
settings:
|
|
|
|
number_of_shards: 1
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_template: {}
|
|
|
|
|
|
|
|
- match: {test.template: "test-*"}
|
|
|
|
- match: {test2.template: "test2-*"}
|
|
|
|
|
2014-01-17 10:39:18 -05:00
|
|
|
---
|
|
|
|
"Get template with local flag":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_template:
|
|
|
|
name: test
|
|
|
|
local: true
|
|
|
|
|
|
|
|
- is_true: test
|
2014-07-02 02:42:31 -04:00
|
|
|
|
|
|
|
---
|
|
|
|
"Get template with flat settings":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.get_template:
|
|
|
|
name: test
|
|
|
|
flat_settings: true
|
|
|
|
|
|
|
|
- match: {test.settings: {index.number_of_shards: '1', index.number_of_replicas: '0'}}
|