The repo is to supplement the youtube video on Opensearch Service in AWS.
-
Create Domain
Enter a Domain Name. Select Development and Testing for Deployment Type
Select
t3.small.search
Node TypeSelect
create master user
and Enter Username/Password -
Upload Documents
Upload a signle document using the api
curl -XPUT -u 'master-user:master-user-password' 'domain-endpoint/movies/_doc/1' -d '{"director": "Burton, Tim", "genre": ["Comedy","Sci-Fi"], "year": 1996, "actor": ["Jack Nicholson","Pierce Brosnan","Sarah Jessica Parker"], "title": "Mars Attacks!"}' -H 'Content-Type: application/json'
Upload multiple documents create a json file and upload
curl -XPOST -u 'master-user:master-user-password' 'domain-endpoint/_bulk' --data-binary @bulk_movies.json -H 'Content-Type: application/json'
-
Search for Document using API
search for a document via API
curl -XGET -u 'master-user:master-user-password' 'domain-endpoint/movies/_search?q=mars&pretty=true'
-
Search for document via UI Search Via UI
domain-endpoint/_dashboards/
Once on the dashboard click
Discover
on the left handsideType
movies
into the text input box and clickNext Step
The searchable index pattern will be created and the fields listed
Click the hamburger menu on the left hand side and click
Discovery
again. The searchable index will now appear. -
Delete a domain
Johnny Chivers
Enjoy 🤘