Skip to content

Commit

Permalink
Testing: Added REST tests to check if expression scripting works
Browse files Browse the repository at this point in the history
Note: The plus sign is not treated correctly in encoding and can lead
to problems, if the search request is encoded as HTTP parameter
instead of the HTTP body.

Relates #9769
  • Loading branch information
spinscale committed Feb 19, 2015
1 parent 0bc5f59 commit 209fdb8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions rest-api-spec/test/script/30_expressions.yaml
@@ -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' } } } } }
- match: { hits.hits.0.fields.my_field: [ 23.0 ] }

0 comments on commit 209fdb8

Please sign in to comment.