References from:
http://blog.csdn.net/u012307002/article/details/52837756
Https://github.com/NLPchina/elasticsearch-sql
1.elasticsearch-sql
Although the query for ES is very powerful, the query Language (DSL) is cumbersome, whether it is encapsulating JSON or encapsulating it through the Python/java API. Elasticsearch-sql can query es with SQL, which is easier and more readable for people who are unfamiliar with ES's DSL.
Features Supported by Elasticsearch-sql:
(1) Plug-in installation
(2) SQL query
(3) Beyond the SQL query
(4) Support for JDBC mode
2.es-sql installation method: On-line installation (this machine uses this installation method)
Official Installation Guide: Https://github.com/NLPchina/elasticsearch-sql
Step1: Execute installation command
Select the version that matches es and execute the command in the bin directory:
1 Install https://GITHUB.COM/NLPCHINA/ELASTICSEARCH-SQL/RELEASES/DOWNLOAD/2.4.2.1/ Elasticsearch-sql-2.4.2.1.zip
After successful execution, you can see that the ES plugin has more SQL.
Step2: Restart es3.es-sql installation Method Two: Off-line installation (88 on the use of this installation method) If you failed to install the Es-sql plugin successfully by using method one, you can manually download the Es-sql package and add it to the Plugins folder. Manual Installation Reference Documentation: HTTP://BLOG.CSDN.NET/U012307002/ARTICLE/DETAILS/52837756
Step1: Download the es-sql Zip package
Select the version that matches es to download, https://github.com/NLPchina/elasticsearch-sql/releases/download/
Step2: Unzip it, place it in the ES Plugins folder and rename it to SQL
Step3: Restart ES
Basic use of 4.es-sql
If the ES installation succeeds, the access path http://localhost:9200/_plugin/sql/, the following screen should appear:
Create a new index:
URL:http://127.0.0.1:9200/song001/list001/1 POST
Data:{"number": 32768, "singer": "Yang Kun", "Size": "5109132", "Song": "20 years old Tonight", "tag": "China good Voice", "Timelen": 319}
(1) query using SQL in Es-sql's visualization page
(2) Querying with SQL by initiating an HTTP request
Or
The data returned is in JSON format: (broken net, had to use the previous diagram)
Supported SQL statements for 5.es-sql
Https://github.com/NLPchina/elasticsearch-sql
In addition to supporting SQL's original syntax, there are beyond SQL:
6.es-sql support for JDBC check DETAILS:JDBC
2017.8.30 elasticsearch-sql Installation and use