How to index documents in Elasticsearch?
Let's learn how Elasticsearch actually works by indexing these three sample documents. While learning this, we will touch upon a few important functions/concepts of Elasticsearch.
These are the three sample JSON documents to be indexed:
{ "name": "Angela Martin", "birthdate": "1997-11-02", "street": "63542 Times Square", "city": "New York", "state": "NY", "zip": "10036", "homePhone": "212-415-8929", "cellPhone": "212-171-8187" } , { "name": "Sam Taylor", "birthdate": "1995-08-11", "street": "155 rabbit Street", "city": "San Francisco", "state": "ca", "zip": "94107", "homePhone": "510-415-8929", "cellPhone": "408-171-8187" } , { "name": "Dan Lee", "birthdate": "1970-01-25", "street": "76336 1st Street", "city": "Los Angeles", "state": "ca", "zip": "90010", "homePhone": "323-892-5363", "cellPhone": "213-978-1320" }
Elasticsearch installation
First things first. Let's install Elasticsearch.
Please do the following steps to install Elasticsearch on your server...