Installation and use of 2017.8.30 Elasticsearch-sql

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.