-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path10_basic.yml
46 lines (46 loc) · 1.06 KB
/
10_basic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
requires:
serverless: true
stack: true
---
setup:
- do:
indices.create: { index: 'render_search_template' }
- do:
put_script:
id: 'search_template'
body:
script:
lang: 'mustache'
source:
query:
match:
message: '{{query_string}}'
from: '{{from}}'
size: '{{size}}'
params: { query_string: 'My query string' }
---
teardown:
- do:
indices.delete: { index: 'render_search_template' }
---
'render and search search_template':
- do:
render_search_template:
body:
id: 'search_template'
params:
query_string: 'hello world'
from: 20
size: 10
- match: { template_output.query.match.message: 'hello world' }
- do:
search_template:
index: 'render_search_template'
body:
id: 'search_template'
params:
query_string: 'hello world'
from: 20
size: 10
- gt: { _shards.total: 0 }