elasticsearch-head和elasticsearch-sql 使用教程(7.4.0)
文章目录
elasticsearch-head使用教程
- 下载运行
使用内置服务器运行
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
npm run start
open http:// localhost:9100 /
这将启动在端口9100上运行的本地web服务器,为elasticsearch-head服务
elasticsearch-sql 使用教程
Github
地址:https://github.com/NLPchina/elasticsearch-sqlelasticsearch-sql
插件可以方便我们使用SQL
语言来对elasticsearch
进行查询
使用方式
- 进入
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
下 -
下载页面需要的
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/
访问插件
es sql说明
x-pack-sql
:
es7.x
版本的x-pack
自带es sql
,使用例如
http://localhost:9200/_sql { "query": "SELECT * FROM article_ik_pinyin" }
elasticsearch-sql
- 支持到
es6.8
:https://github.com/NLPchina/elasticsearch-sql/ - 安装:
./elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.5.4.0/elasticsearch-sql-6.5.4.0.zip
- 使用
l/releases/download/6.5.4.0/elasticsearch-sql-6.5.4.0.zip
- 使用
curl -X GET "localhost:9200/_sql" -H 'Content-Type: application/json' -d'select * from ar