Preliminary study on Elasticsearch

Source: Internet
Author: User

    • The concepts in Elasticsearch are analogous to traditional databases:

Columns, Tables, Databases, relational DB
Elasticsearch, Indices, Types,

    • Import Data API:
Curl-xpost ' http://localhost:9200/prd/xjb3/_bulk--data-binary@Last.json

    • The data format in the Last.json file is shaped like the:< data address:http://files.cnblogs.com/files/kevin-yuan/elasticsearchjsondata.zip>
{"Index": {"_id": "1"}}{"Account_number": 1, "balance": 39225, "FirstName": "Amber", "LastName": "Duke", "Age" : "Gender": "M", "Address": "880 Holmes Lane", "Employer": "Pyrami", "email": "[email protected]", "City": "Brogan", " State ":" IL "} {" index ": {" _id ":" 6 "}}{" Account_number ": 6," balance ": 5686," FirstName ":" Hattie "," LastName ":" Bond "," Age ":" Gender ":" M "," Address ":" 671 Bristol Street "," Employer ":" Netagy "," email ":" [email Protected] "," City ":" Dante "," state ":" TN "} {" index ": {" _id ":"}}{"," Account_number ":" Balance " : 32838, "FirstName": "Nanette", "LastName": "Bates", "Age": "Gender": "F", "Address": "789 Madison Street", "Employer": "Quility", "email": "[email protected]", "City": "Nogal", "state": "VA"}

    • Sort Query API:
http://localhost:9200/prd/xjb3/_search?  Sort=balance:desc 

    • Specify the number of returned bars: plus size=n
http://localhost:9200/prd/xjb3/_search?sort=amount:desc&size=100 

Preliminary study on Elasticsearch

Related Article

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.