elasticsearch-HQ 安装与使用

https://github.com/ElasticHQ/elasticsearch-HQ

 

  1. Download or clone the repository.
  2. Open terminal and point to root of repository. Type: pip install -r requirements.txt
  3. Run server with: 
     nohup /usr/bin/python3 -u /usr/local/software/elasticsearch-HQ-master/application.py >>all.log 2>&1 &
  4. Access HQ with: http://localhost:5000

 

  安装elasticsearch-sql-6.2.2

cd /usr/local/elasticsearch

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

 

On elasticsearch 5.x/6.x, download and extract site.

Then start the web front-end like this:

cd site-server
npm install express --save

nohup node node-server.js >>node-server.log 2>&1 &


可以在site-server/site_configuration.json配置文件中修改启动服务的端口。

4.重启es,再启动es-sql前端
     添加es-sql插件后,重启es,然后启动es-sql前端服务
     启动前端服务:先切换到es-sql/site-server目录下,执行如下语句
node node-server.js &

     启动后,访问:http://ip:8088/   然后配置es地址,如下:
  • Simple query
http://data.xxxx.com:9200/_sql?sql=select * from t_base_student limit 10
 
SELECT identity_id,person_id,sum(resource_size_int) as sumall FROM t_resource_info group by identity_id,person_id order by sumall desc limit 100

 

  • Explain SQL to elasticsearch query DSL
http://localhost:9200/_sql/_explain?sql=select * from indexName limit 10
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值