Elasticsearch开启groovy动态语言支持

# Elasticsearch开启groovy动态语言支持

> 在最新版本的elasticsearch中,基于安全考虑(如果用不到,请保持禁用),默认禁用了动态脚本功能.以下命令用于开启动态脚本功能

### 错误展现

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

### 完全开启

编辑```config/elasticsearch.yml```文件,在最后添加以下代码

1 script.inline: on
2 script.indexed: on
3 script.file: on

### 沙盒中开启

编辑```config/elasticsearch.yml```文件,在最后添加以下代码

1 script.inline: sandbox
2 script.indexed: sandbox
3 script.file: on

### 参数说明

* on 完全开启

* off 完全关闭

* sandbox 在沙盒中运行

### 语言支持

* groovy 不支持沙盒,elasticsearch内建支持

* expression 支持沙盒,elasticsearch内建支持

* mustache 支持沙盒,elasticsearch内建支持

* javascript 不支持沙盒,需要插件

* python 不支持沙盒,需要插件

猜你喜欢

转载自m635674608.iteye.com/blog/2269661