---
setup:
  - skip:
       version:     "0 - 100"
       reason:      Java returns floating point, but JSON returns integer
  - do:
      indices.create:
        index: test123
        body:
          mappings:
            test:
              properties:
                age:
                  type: long
  - do:
      index:
        index:  test123
        type:   test
        id:     1
        body:   { age: 23 }

  - do:
      indices.refresh: {}

---
"Expressions scripting test":

  - do: { search: { body: { script_fields : { my_field : { lang: expression, script: 'doc["age"].value' } } } } }
  - match:  { hits.hits.0.fields.my_field: [ 23 ] }


---
setup:
  - do:
      indices.create:
        index: test123
        body:
          mappings:
            test:
              properties:
                age:
                  type: long
  - do:
      index:
        index:  test123
        type:   test
        id:     1
        body:   { age: 23 }

  - do:
      indices.refresh: {}

---
"Expressions scripting test":

  - do: { search: { body: { script_fields : { my_field : { lang: expression, script: 'doc["age"].value' } } } } }
  - match:  { hits.hits.0.fields.my_field.0: 23.0 }


Fix script-expressions test to work with Perl
REST: Fix script-expressions test to work with Perl

Closes #9931
