2014-07-14 09:37:55 -04:00
|
|
|
---
|
|
|
|
"Indexed template":
|
|
|
|
|
|
|
|
- do:
|
2014-07-16 05:46:55 -04:00
|
|
|
put_template:
|
2014-07-14 09:37:55 -04:00
|
|
|
id: "1"
|
|
|
|
body: { "template": { "query": { "match_all": {}}, "size": "{{my_size}}" } }
|
|
|
|
- match: { _id: "1" }
|
|
|
|
|
|
|
|
- do:
|
2014-07-16 05:46:55 -04:00
|
|
|
get_template:
|
2014-07-14 09:37:55 -04:00
|
|
|
id: 1
|
2015-04-02 10:48:37 -04:00
|
|
|
- match: { found: true }
|
|
|
|
- match: { lang: mustache }
|
|
|
|
- match: { _id: "1" }
|
|
|
|
- match: { _version: 1 }
|
2014-07-14 12:06:23 -04:00
|
|
|
- match: { template: /.*query\S\S\S\Smatch_all.*/ }
|
2014-07-14 09:37:55 -04:00
|
|
|
|
2015-04-02 10:48:37 -04:00
|
|
|
- do:
|
|
|
|
catch: missing
|
|
|
|
get_template:
|
|
|
|
id: 2
|
|
|
|
- match: { found: false }
|
|
|
|
- match: { lang: mustache }
|
|
|
|
- match: { _id: "2" }
|
|
|
|
- is_false: _version
|
|
|
|
- is_false: template
|
2014-07-14 09:37:55 -04:00
|
|
|
|
|
|
|
- do:
|
2014-07-16 05:46:55 -04:00
|
|
|
delete_template:
|
2014-07-14 09:37:55 -04:00
|
|
|
id: "1"
|
|
|
|
- match: { found: true }
|
|
|
|
- match: { _index: ".scripts" }
|
|
|
|
- match: { _id: "1" }
|
2015-04-02 10:48:37 -04:00
|
|
|
- match: { _version: 2}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: missing
|
|
|
|
delete_template:
|
|
|
|
id: "non_existing"
|
|
|
|
- match: { found: false }
|
|
|
|
- match: { _index: ".scripts" }
|
|
|
|
- match: { _id: "non_existing" }
|
|
|
|
- match: { _version: 1 }
|
2014-07-14 09:37:55 -04:00
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: request
|
2014-07-16 05:46:55 -04:00
|
|
|
put_template:
|
2014-07-14 09:37:55 -04:00
|
|
|
id: "1"
|
|
|
|
body: { "template": { "query": { "match{{}}_all": {}}, "size": "{{my_size}}" } }
|
2014-07-16 11:30:18 -04:00
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: /ElasticsearchIllegalArgumentException\SUnable\sto\sparse.*/
|
|
|
|
put_template:
|
|
|
|
id: "1"
|
|
|
|
body: { "template": { "query": { "match{{}}_all": {}}, "size": "{{my_size}}" } }
|