Github地址:https://github.com/NLPchina/elasticsearch-sql 
elasticsearch-sql插件可以方便我们使用SQL语言来对elasticsearch进行查询

1、进入elasticsearch的安装目录,执行如下命令(windows和linux的斜杠要注意):

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.2.3.0/elasticsearch-sql-6.2.3.0.zip

或者从Github上下载后解压放在ES的plugins\sql下

2、下载页面需要的node.js文件

https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.1.0/es-sql-site-standalone.zip

在解压目录下安装运行即可

npm install express --save

node node-server.js

elasticsearch-sql的默认端口是8080,可以在site-server/site_configuration.json文件中进行修改 
然后 打开 http://localhost:8080/ 访问插件

注意修改右上角本地elasticsearch的地址,sql脚本不需要以分号“;”结尾,如果一个index有多个type,表名用indexName/typeName表示

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2021-08-31
  • 2021-07-23
  • 2021-11-20
  • 2022-01-06
  • 2022-01-23
  • 2021-11-18
猜你喜欢
  • 2021-09-09
  • 2021-11-09
  • 2021-08-15
  • 2021-10-29
  • 2021-08-27
  • 2021-07-22
相关资源
相似解决方案