elasticsearch sql

安装 插件

elasticsearch-sql   

参考:

https://github.com/NLPchina/elasticsearch-sql/wiki/Installation-Guide

提示要   (make sure to enable cors on elasticsearch.yml)

 

设置es  的 cors  参数:

https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-http.html

 

http.cors.enabled true 如果启用了 HTTP 端口,那么此属性会指定是否允许跨源 REST 请求。
http.cors.allowed.origin localhost 如果 http.cors.enabled 的值为 true,那么该属性会指定允许 REST 请求来自何处。

 

 

也可以简单添加设置elasticsearch.yml为:

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: "GET,POST"
http.cors.allow-credentials: true

 

posted @ 2018-10-12 10:07  jellyabd  阅读(265)  评论(0编辑  收藏  举报