1.elasticsearch-sql插件项目地址:
https://github.com/NLPchina/elasticsearch-sql
2.elasticsearch.yml配置
http.cors.enabled: true
http.cors.allow-origin: "*"
3.安装
执行此命令会在elasticsearch-6.6.0/plugins下创建sql目录
./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.6.0.0/elasticsearch-sql-6.6.0.0.zip
进入自建的es插件目录
cd ../esplugin
mkdir elasicsearc-sql
cd elasicsearc-sql
下载https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.1.0/es-sql-site-standalone.zip
并解压至elasicsearc-sql
cd site-server
npm install express --save
node node-server.js
4.访问
http://localhost:8080/
右上角修改es地址即可使用
端口号可以在site-server/site_configuration.json中修改
5.其它
使用sql时语句最后不要加;