Closed
Description
Running with 1.4.4, when trying to update an existing document, one cannot use the undocumented script_file
because it complains of a validation error (expecting "script" or "doc").
POST /test/type/1/_update
{
"script_file" : "AddTag",
"lang": "groovy",
"params": {
"tag": "tag5"
}
}
Fails due to:
{
"error": "ActionRequestValidationException[Validation Failed: 1: script or doc is missing;]",
"status": 400
}
As a workaround, you can supply the script file directly using the script
parameter (even with dynamic scripting disabled for Groovy because it recognizes that it is a file).
POST /test/type/1/_update
{
"script" : "AddTag",
"lang": "groovy",
"params": {
"tag": "tag5"
}
}