- The concepts in Elasticsearch are analogous to traditional databases:
Columns, Tables, Databases, relational DB
Elasticsearch, Indices, Types,
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"}
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