27 lines
565 B
YAML
27 lines
565 B
YAML
|
# Integration tests for Lang JavaScript components
|
||
|
#
|
||
|
setup:
|
||
|
- do:
|
||
|
index:
|
||
|
index: test
|
||
|
type: test
|
||
|
id: 1
|
||
|
body: { "foo": "aaa" }
|
||
|
- do:
|
||
|
indices.refresh: {}
|
||
|
|
||
|
---
|
||
|
|
||
|
"Lang JavaScript":
|
||
|
- do:
|
||
|
search:
|
||
|
body:
|
||
|
script_fields:
|
||
|
bar:
|
||
|
lang: javascript
|
||
|
script: "doc['foo'].value + x"
|
||
|
params:
|
||
|
x: "bbb"
|
||
|
|
||
|
- match: { hits.hits.0.fields.bar.0: "aaabbb"}
|