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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM