Problem:
Explain with examples on how to create documents and search within indexes in a domain.
Solution Summary:
We can create documents and search within indexes in an Amazon ES domain either from command line, Kibana or any HTTP client. Creating documents and searching within indexes from Kibana is already shown in Elasticsearch Essentials. So here we wilkl see how we can do the same from command line.
Prerequisites:
Solution Steps:
Case 1 - Creating Documents in Amazon ES Domain
curl -XPUT <endpoint>/employee/_doc/1 -d '{"name": "Heartin", "gender": "M"}' -H 'Content-Type: application/json'
Case 2 - Searching Documents in Amazon ES Domain
curl -XGET <endpoint>/employee/_doc/1
Additional Notes
-
Please practice recipes within notes 1-10 from Elasticsearch Essentials.
-
Please read and try bulk update on Amazon ES, and then practice recipes within notes from 11 at Elasticsearch Essentials.
-
In real world, you will also need to configure and use authentication while making requests against Amazon ES from command line. See bulk update note on Elastic Cloud for syntax to pass username and password.
Recent comments