问题
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
回答1:
My problem was coming from the configuration of Elasticsearch. I just added,
script.disable_dynamic: false
and it started to work.
来源:https://stackoverflow.com/questions/29105351/can-not-get-result-of-script-fields-in-elasticsearch