开启elastic search 脚本

脚本开启功能

    在最新版本的Elasticsearch中,基于安全考虑(如果用不到,请保持禁用),默认禁用了动态脚本功能.如果被禁用,在使用脚本的时候则报以下的错误:

scripts of type [inline], operation [update] and lang [groovy] are disabled

    可以用以下方式完全开启动态脚本功能,在config/elasticsearch.yml文件,在最后添加以下代码:

script.inline: on

script.indexed: on

script.file: on

配置后,重启Elasticsearch。

原文地址:https://www.cnblogs.com/liyangxj/p/5288576.html