使用elasticsearch,Elasticsearch Scripts disabled
来源:互联网 发布:淘宝750海报是多大 编辑:程序博客网 时间:2024/06/07 11:44
关键词搜索的时候,报错
Elasticsearch::Transport::Transport::Errors::BadRequest at /micro/complex_search/complex
[400] {"error":{"root_cause":[{"type":"script_exception","reason":"scripts of type [inline], operation [search] and lang [groovy] are disabled"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"development_hospitals_1482752510430","node":"fnwviKt7Q1etguNZ_MqwHg","reason":{"type":"query_parsing_exception","reason":"script_score the script could not be loaded","index":"development_hospitals_1482752510430","line":1,"col":157,"caused_by":{"type":"script_exception","reason":"scripts of type [inline], operation [search] and lang [groovy] are disabled"}}}]},"status":400}
解决办法:
Es 2.2版本中,在查询语句中使用script 时,提示如下错误
scripts of type [inline], operation [aggs] and lang [groovy] are disabled
因为新版本的elasticsearch中,基于安全考虑,默认禁用了动态脚本功能.通过修改配置文件开启动态脚本功能
编辑 config/elasticsearch.yml 文件,添加
script.inline: on
script.indexed: on
script.file: on
- 使用elasticsearch,Elasticsearch Scripts disabled
- elasticsearch scripts of type [inline], operation [update] and lang [groovy] are disabled
- elasticsearch使用
- ElasticSearch使用
- Elasticsearch使用
- ElasticSearch使用
- ElasticSearch
- Elasticsearch
- Elasticsearch
- ElasticSearch
- elasticSearch
- elasticsearch
- Elasticsearch
- ELasticsearch
- Elasticsearch
- ElasticSearch
- elasticsearch
- Elasticsearch
- SimpleDateFormat的setLenient(true/false)-----自动计算日期
- javascript中call()和apply()方法的区别
- Paxos算法 反证法证明
- 文件下载java代码实现
- java实现多重继承
- 使用elasticsearch,Elasticsearch Scripts disabled
- CSS超出部分显示省略号…代码
- 解决ico图标不透明
- 使用Web管理型交换机配置LACP
- android继承FragmentActivity对话框Alertdialog弹出闪退问题
- 名企笔试:2016 Google 在线评测题(数据传输问题)
- junit使用
- android简单实现无限滚动,自动滚动的ViewPager
- 《从零开始学Swift》学习笔记(Day 65)——Cocoa Touch设计模式及应用之选择器