mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-23 05:15:04 +00:00
Testing: Added REST tests to check if expression scripting works
This commit is contained in:
parent
eb666f7f50
commit
2dc70597c2
15
rest-api-spec/test/script/30_expressions.yaml
Normal file
15
rest-api-spec/test/script/30_expressions.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
"Expressions scripting test":
|
||||
|
||||
- do:
|
||||
index:
|
||||
index: test123
|
||||
type: test
|
||||
id: 1
|
||||
body: { age: 23 }
|
||||
|
||||
- do:
|
||||
indices.refresh: {}
|
||||
|
||||
- do: { search: { body: { script_fields : { my_field : { lang: expression, script: 'doc["age"].value + 19' } } } } }
|
||||
- match: { hits.hits.0.fields.my_field: [ 42.0 ] }
|
Loading…
x
Reference in New Issue
Block a user