Hi guys,
I've been trying to save a script following the guideline Ive found in here: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting-using.html#_request_examples
My request would be:
POST _scripts/func_test
{
"script": {
"lang": "painless",
"code": "10 + params.my_modifier"
}
}
As a response, I'm getting:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "request [/_scripts/func_test] contains unrecognized parameter: [lang]"
}
],
"type": "illegal_argument_exception",
"reason": "request [/_scripts/func_test] contains unrecognized parameter: [lang]"
},
"status": 400
}
Removing the "lang" param didn't help.
May guys tell me what I'm missing out here?
Cheeers