UpdateRequest updateRequest = new UpdateRequest("anothers", "type", "foo1")
.script(new Script(ScriptType.INLINE,
"ctx._source.aka.removeIf(item -> item.name =='female')",
Script.DEFAULT_SCRIPT_LANG,
Collections.emptyMap()));
在header插件中直接请求却没有问题 ,下面是请求语法
{
"script": {
"source": "ctx._source.aka.removeIf(item -> item.name =='female');",
"lang": "painless",
"params": {}
}
}
java中报错为java.lang.IllegalArgumentException: script_lang not supported [ctx._source.aka.removeIf(item -> item.name =='female')] 求大神帮忙解决下
0 个回复