伸缩自如的ElasticSearch——ElasticSearch-sql安装及使用

安装ElasticSearch-sql

安装地址:
ES-sql地址
注意安装版本要与ES版本一致(这里是6.7.1)。

安装完成后,解压。将解压后的文件夹放入ES的plugins文件夹下。
伸缩自如的ElasticSearch——ElasticSearch-sql安装及使用

安装es-sql-site

安装地址:
ES-sql-site地址

安装完成后,执行下面的命令:

cd site-server
npm install express --save

修改ES的elasticsearch.yml,加入下面的内容:

http.cors.enabled: true
http.cors.allow-credentials: true
http.cors.allow-origin: "/.*/"
http.cors.allow-headers: WWW-Authenticate,X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization

每次运行:
node node-server.js

然后,进入到localhost:8080,修改右上角的端口号(原本是8080,修改成ES端口号,一般是9200)
伸缩自如的ElasticSearch——ElasticSearch-sql安装及使用