Amazon CloudSearch | Search Domains, Data, and Indexing Flashcards
Can I still use the Amazon CloudSearch CLTs?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
Yes, the Amazon CloudSearch CLTs will continue to work.
What is a search domain and how do I create one?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
A search domain is a data container and a set of services that make the data searchable. These services include:
A document service that allows you upload data to your domain for indexing.
A search service that allows you to perform search requests against your indexed data.
A configuration service for controlling your domain’s behavior (including relevance ranking).
You can create, manage, and delete search domains using the AWS Management Console, AWS SDKs, or AWS CLI.
How do I upload documents to my search domain?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
You upload documents to your domain using the AWS Management Console, AWS SDKs, or AWS CLI.
Do my documents need to be in a particular format?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
To make your data searchable, you need to format your data in JSON or XML. Each item that you want to be able to receive as a search result is represented as a document. Every document has a unique document ID and one or more fields that contain the data that you want to search and return in results. Amazon CloudSearch generates a search index from your document data according to the index fields configured for the domain. As your data changes, you submit updates to add or delete documents from your index.
How do I create document batches formatted for Amazon CloudSearch?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
To create document batches that describe your data, you create JSON or XML text files that specify:
The operation type: add or delete
A unique identifier
The actual fields and their data
The following example shows a single document batch formatted in JSON:
[
{
“fields” : {
“directors” : [
“Francis Lawrence”
],
“release_date” : “2013-11-11T00:00:00Z”,
“genres” : [
“Action”,
“Adventure”,
“Sci-Fi”,
“Thriller”
],
“image_url” : “http://ia.media-imdb.com/images/M/MV5xMzzAx._V1_SX400_.jpg”,
“plot” : “Katniss Everdeen and Peeta Mellark become targets of the Capitol after their victory in the 74th Hunger Games sparks a rebellion in the Districts of Panem.”,
“title” : “The Hunger Games: Catching Fire”,
“rank” : 4,
“running_time_secs” : 8760,
“actors” : [
“Jennifer Lawrence”,
“Josh Hutcherson”,
“Liam Hemsworth”
],
“year” : 2013
},
“id” : “tt1951264”,
“type” : “add”
}
]
Note that numeric values such as the year are not enclosed in quotes, and that values in a multi-value field such as genres are listed in a JSON array.
To make this data available to Amazon CloudSearch, you can save it to a file and upload it using the AWS Management Console, AWS SDKs, or AWS CLI.
How do my documents get indexed?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
Documents are automatically indexed when you upload them to your search domain. You can also explicitly re-index your documents when you make configuration changes by sending an IndexDocuments request.
When do I need to re-index my domain?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
Certain configuration options, such as adding a new index field or updating your stemming or stopword dictionaries, are not available until your domain is re-indexed. When you have made changes that require indexing, the domain’s status will indicate that it needs to be indexed. You can initiate indexing from the AWS Management Console, AWS SDKs, or AWS CLI.
How do I send search requests to my search domain?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
Every search domain has a REST-based search service with a unique URL (search endpoint) that accepts search requests for its document set. You can send search requests from the AWS Management Console, AWS SDKs, or AWS CLI.
Can a search domain span multiple Availability Zones?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
Yes. If you enable the Multi-AZ option, Amazon CloudSearch deploys additional instances in a second availability zone in the same Region. For more information, see Configuring Availability Options in the Amazon CloudSearch Developer Guide.
Can I move a search domain from one region to another?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
At this time, there is no way to automatically migrate a search domain from one region to another. You will need to create a new domain in the target region, configure the domain and upload your data, then delete the original domain.
How do I delete my search domain?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
To delete a search domain, click on Delete Domain button in the Amazon CloudSearch console. You can also delete domains through the AWS SDKs or AWS CLI.
How do I delete documents from my search domain?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
To delete documents you specify a delete operation in your batch upload that contains the ID of the document you want to remove.
You can submit data updates through the AWS Management Console, AWS SDKs, or AWS CLI.
How do I empty my search domain?
Search Domains, Data, and Indexing
Amazon CloudSearch | Analytics
If you wish to maintain your domain’s endpoints, you can send a delete for each document that is in your domain.