使用Scripted Metric Aggregation进行聚合时,出现以下错误提示:
nested: QueryParsingException[[my_index] script_score the script could not be loaded]; nested: ScriptException[scripts of type [inline], operation [search] and lang [groovy] are disabled]; .
解决办法, 修改配置文件,启用groovy, 在重启
[root@elasticsearch]# tail -n 10 /etc/elasticsearch/elasticsearch.yml
# http server. With this enabled, it may pose a security risk, so disabling
# it unless you need it is recommended (it is disabled by default).
#
#http.jsonp.enable: true
script.groovy.sandbox.enabled: true
script.inline: on
script.indexed: on
script.search: on
script.engine.groovy.inline.aggs: on
[root@elasticsearch]# /etc/rc.d/init.d/elasticsearch restart
Stopping elasticsearch: [ OK ]
Starting elasticsearch: [ OK ]
使用 Scripted Metric Aggregation 遇到的问题
猜你喜欢
转载自horsemen.iteye.com/blog/2277420
今日推荐
周排行