2014-03-17 06:30:47 -04:00
|
|
|
---
|
|
|
|
"Template search request":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: test
|
|
|
|
type: testtype
|
|
|
|
id: 1
|
|
|
|
body: { "text": "value1" }
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: test
|
|
|
|
type: testtype
|
|
|
|
id: 2
|
|
|
|
body: { "text": "value2" }
|
|
|
|
- do:
|
|
|
|
indices.refresh: {}
|
|
|
|
|
|
|
|
- do:
|
2014-03-20 16:58:08 -04:00
|
|
|
search_template:
|
2014-03-17 06:30:47 -04:00
|
|
|
body: { "template" : { "query": { "term": { "text": { "value": "{{template}}" } } } }, "params": { "template": "value1" } }
|
|
|
|
|
|
|
|
- match: { hits.total: 1 }
|
|
|
|
|
|
|
|
- do:
|
2014-03-20 16:58:08 -04:00
|
|
|
search_template:
|
2014-03-17 06:30:47 -04:00
|
|
|
body: { "template" : { "query": { "match_{{template}}": {} } }, "params" : { "template" : "all" } }
|
|
|
|
|
|
|
|
- match: { hits.total: 2 }
|