скрипты типа [inline], Operation [update] и lang [groovy] отключены

У нас есть elasticSearch версии 2.4.0. Я обновил elasticsearch.yml со следующими значениями:

script.inline: true
script.indexed: true
script.update: true
script.mapping: true
script.engine.groovy.file.aggs: true
script.engine.groovy.file.mapping: true
script.engine.groovy.file.search: true
script.engine.groovy.file.update: true
script.engine.groovy.file.plugin: true
script.engine.groovy.indexed.aggs: true
script.engine.groovy.indexed.mapping: true
script.engine.groovy.indexed.search: true
script.engine.groovy.indexed.update: true
script.engine.groovy.indexed.plugin: true
script.engine.groovy.inline.aggs: true
script.engine.groovy.inline.mapping: true
script.engine.groovy.inline.search: true
script.engine.groovy.inline.update: true
script.engine.groovy.inline.plugin: true

Я использую _update_by_query API со следующим примером полезной нагрузки:

{
  "script":{
  "inline": "ctx._source.myVariable = ctx._source.id == params.newVal ? 'test':ctx._source.myVariable ",
  "params": {
      "newVal": "2c9ef"
    }}
}

Я все еще получаю следующий ответ об ошибке:

{
    "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
}

Я взял информацию о конфигурации из здесь.


person Gourav Soni    schedule 20.09.2018    source источник


Ответы (1)


Вы должны перезапустить свой экземпляр ES, чтобы эти изменения вступили в силу.

person MrMartin    schedule 06.04.2019