elasticsearch-6.3.0中的脚本引擎

时间:2018-08-29 10:30:37

标签: elasticsearch-plugin elasticsearch-6

当前我正在迁移elasticsearch-6.3.0,其中一部分必须将脚本更改更改为Script Engine。我已经使用本机语言Java编写了脚本。以下语法用于传递值

Added the following in elasticsearch.yml script.allowed_types: inline

Script name is "country_script" ,lang is "native"

   Map params = new HashMap();
            params.put("countryCode", srcCountryCode);
            params.put("isSourceCountry", true);
            Script script = new Script(ScriptType.INLINE, "native",    "country_script", params);

But i am getting the following exceptions,

nested: IllegalArgumentException[script_lang not supported [native]];

Caused by: java.lang.IllegalArgumentException: script_lang not supported [native]

0 个答案:

没有答案