• Elasticsearch6.2.1安装elasticsearch-sq插件


    参考

    https://github.com/NLPchina/elasticsearch-sql
    

    1.下载插件

    wget https://github.com/NLPchina/elasticsearch-sql/releases/download/6.2.1.0/elasticsearch-sql-6.2.1.0.zip
    

    2.安装

    ./bin/elasticsearch-plugin instal file:///home/lintong/下载/elasticsearch-sql-6.2.1.0.zip
    

    如果遇到 Exception in thread "main" java.lang.IllegalArgumentException: Unknown properties in plugin descriptor: [jvm, site]

    解压zip文件,然后修改 plugin-descriptor.properties 文件

    去掉下面两行后重新压缩成zip,然后再安装

    site=
    jvm=
    

    参考

    https://github.com/NLPchina/elasticsearch-sql/issues/610
    

    3.下载前端组件

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

    解压

    cd site-server
    npm --registry https://registry.npm.taobao.org install express --save
    node node-server.js 
    

    4.执行sql

    curl -X GET "localhost:9200/_sql" -H 'Content-Type: application/json' -d'select * from es limit 10'
    {"took":7,"timed_out":false,"_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":20000,"max_score":1.0,"hits":[{"_index":"es","_type":"people","_id":"0","_score":1.0,"_source":{"playerId":122,"logId":0,"dateTime":"2012-01-02 00:21:00","action":"私聊:нужен парень 0965188229"}},{"_index":"es","_type":"people","_id":"14","_score":1.0,"_source":{"playerId":343,"logId":14,"dateTime":"2012-01-02 00:35:00","action":"私聊:с новым годом!скучно девченкам.0988939122"}},{"_index":"es","_type":"people","_id":"19","_score":1.0,"_source":{"playerId":219,"logId":19,"dateTime":"2012-01-02 00:42:00","action":"私聊:ищу взрослую женщину звоните 0661464552"}},{"_index":"es","_type":"people","_id":"22","_score":1.0,"_source":{"playerId":822,"logId":22,"dateTime":"2012-01-02 00:45:00","action":"私聊:Жду смс от солидного мужчины за 47  0952342589"}},{"_index":"es","_type":"people","_id":"24","_score":1.0,"_source":{"playerId":111,"logId":24,"dateTime":"2012-01-02 00:47:00","action":"私聊:П27 ищу горячую снегурочку 0505618815"}},{"_index":"es","_type":"people","_id":"25","_score":1.0,"_source":{"playerId":204,"logId":25,"dateTime":"2012-01-02 00:48:00","action":"私聊:снегурочька хочет деда мороза.тома.0661796082"}},{"_index":"es","_type":"people","_id":"26","_score":1.0,"_source":{"playerId":789,"logId":26,"dateTime":"2012-01-02 00:49:00","action":"私聊:молодой парень 31год из сел.местн. Очень хочет познакомиться с м"}},{"_index":"es","_type":"people","_id":"29","_score":1.0,"_source":{"playerId":328,"logId":29,"dateTime":"2012-01-02 00:54:00","action":"私聊:ВСЕХ ПАРНЕЙ С НОВЫМ ГОДОМ ЛЮБВИ СЧАСТЬЯ.С УВ.СВЕТА 0666339477.ЗАДЕРЖ"}},{"_index":"es","_type":"people","_id":"40","_score":1.0,"_source":{"playerId":35,"logId":40,"dateTime":"2012-01-02 01:06:00","action":"私聊:ищю парня до21"}},{"_index":"es","_type":"people","_id":"41","_score":1.0,"_source":{"playerId":750,"logId":41,"dateTime":"2012-01-02 01:06:00","action":"私聊:ВСЕХ ДЕВУШЕК С НОВЫМ ГОДОМ Я ВАС ВСЕХ ЛЮБЛЮ 0507143632 СЕРЁГА"}}]}}
    

    5.web界面

    配置在site_configuration.json

  • 相关阅读:
    zzuli2470: 迷宫
    zzuli2460: 楼上真的是签到题
    zzuli2460: 楼上真的是签到题
    洛谷P1044 :栈(卡特兰数)
    洛谷P1044 :栈(卡特兰数)
    洛谷P1056:排座椅(贪心)
    代码块地址
    tabBarItem动画
    vim Podfile
    webView进度条
  • 原文地址:https://www.cnblogs.com/tonglin0325/p/11747929.html
Copyright © 2020-2023  润新知