I will create a serach domain in CloudSearch and upload a JSON file with 5000 movie entries to query it
Services Covered
CloudSearch
Lab description
This lab walks you through the steps to create a search domain in Amazon CloudSearch, upload a sample data and test the application.
Learning Objectives
- Create a search domain
- Upload a sample JSON data
- Test the Search Application
Lab date
20-11-2021
Prerequisites
- AWS account
Lab steps
- Create a search domain. Navigate to CloudSearch and create a new search domain. Give it a name, choose one search.small as instance type. On the next tab choose Analyze sample file(s) from my local machine and use the sample_search_data.json file. This file includes 5000 movie entries to play with. Leave the suggested index field configuration as default and continue. Set my policy to Allow open access to all services.
Confirm the settings and create the domain. It might take quite a long time until it gets active status.
- When your Domain status changes to PROCESSING, you will get a Search Endpoint.
Wait till the status changes to ACTIVE. Upload a sample JSON data. Click on the / button and navigate to the JSON file which you have downloaded previously. Upload documents. - Test the Search Application. In the textbox enter Harry Potter and click on the go button.
Try running different searches to test the engine. - Now test the search endpoint by copying the URL and adding some parameters to it for example:
<your-search-endpoint>/2013-01-01/search?q=harry+potter&return=_all_fields
This will return a JSON with all the Harry Potter movie list.
Or maybe all Tom Hanks entries:<your-search-endpoint>/2013-01-01/search?q=Hanks&return=_all_fields