0

I am trying to use "script_fields" in order to set new values to my fields but I can not see the "field" that I have added on result set,{

  "query": {
    "my_type_x": xxx
  },
  "script_fields": {
    "test1": {
      "script": "doc['my_type'].value * 3"
    }
  }
}

Once I launch this on elasticsearch I get no error and get the results without any problem but I can not see any "test1" with changed value.

Where do I need to review ? Can you please tell me if anything is wrong ?

Thank you

0

1 Answer 1

1

My problem was coming from the configuration of Elasticsearch. I just added,

script.disable_dynamic: false

and it started to work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.