当我执行:
curl -XPOST 'localhost:9200/test/type1/1/_update' -d '{
"script" : "ctx._source.text = \"some text\""
}'
出现了elasticsearch scripts of type [inline], operation [update] and lang [groovy] are disabled这样的错误
解决方法在elasticsearch.yml 里添加
script.inline: on
script.indexed: on
重启即可
原文:
Exception in thread "main" java.lang.IllegalArgumentException: script.disable_dynamic is not a supported setting, replac e with fine-grained script settings. Dynamic scripts can be enabled for all languages and all operations by replacingscript.disable_dynamic: false
withs cript.inline: on
andscript.indexed: on
in elasticsearch.yml