类型为[inline],操作[update]和lang [groovy]的脚本被禁用

时间:2018-09-20 13:26:38

标签: elasticsearch groovy elasticsearch-2.0

我们有 elasticSearch 版本2.4.0。我用以下值更新了 elasticsearch.yml

_update_by_query

我将{ "script":{ "inline": "ctx._source.myVariable = ctx._source.id == params.newVal ? 'test':ctx._source.myVariable ", "params": { "newVal": "2c9ef" }} } API与以下示例有效负载配合使用:

{
    "error": {
        "root_cause": [
            {
                "type": "script_exception",
                "reason": "scripts of type [inline], operation [update] and lang [groovy] are disabled"
            }
        ],
        "type": "script_exception",
        "reason": "scripts of type [inline], operation [update] and lang [groovy] are disabled"
    },
    "status": 500
}

我仍然收到以下错误响应:

<config-file>

我从here中获取了配置详细信息。

1 个答案:

答案 0 :(得分:0)

您必须重新启动ES实例,这些更改才能生效