|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
An Amazon CloudSearch domain encapsulates a collection of data you want to search, the search instances that process your search requests, and a configuration that controls how your data is indexed and searched. You create a separate search domain for each collection of data you want to make searchable. For each domain, you configure indexing options that describe the fields you want to include in your index and how you want to use them, text options that define domain-specific stopwords, stems, and synonyms, rank expressions that you can use to customize how search results are ranked, and access policies that control access to the domains document and search endpoints.
You interact with a search domain to:
Configure index and search options
Submit data for indexing
Each domain has a unique endpoint through which you submit search requests to the domain. For example, the endpoint for a domain called movies created in the US East (Northern Virginia) Region might be:
When creating a search domain, you specify a unique name for the domain. Domain names must start with a letter or number and be at least 3 and no more than 28 characters long. The allowed characters are: a-z, 0-9, and hyphen (-). By default, new domains are created in the US East (Northern Virginia) Region. To create a domain in another region, you must explicitly specify the region when creating the domain.
To configure the new domain, you need to specify:
The index fields you want to be able to search, use as facets, and return in search results.
Access policies for the domain's document service and search service endpoints.
This tutorial shows you how to create and interact with a domain using the Amazon CloudSearch console. For information about how to use the command line tools and APIs, see Creating an Amazon CloudSearch Domain.
The domain you're about to create will be live and you will incur the standard Amazon CloudSearch usage fees for the domain until you delete it. For more information about Amazon CloudSearch usage rates, go to the Amazon CloudSearch detail page.
To create your movies domain
Go to the Amazon CloudSearch console at Amazon CloudSearch console.
On the Welcome to Amazon CloudSearch page, click Create Your First Search Domain.
On the NAME YOUR DOMAIN step, enter a name for your new domain and click Continue. Domain names must start with a letter or number and be at least 3 and no more than 28 characters. Domain names can contain the following characters: a-z (lower case), 0-9, and - (hyphen). Upper case letters and underscores are not allowed.
On the CONFIGURE INDEX step, click Use a predefined configuration, select IMDB movies (demo), and click Continue. You can also automatically configure a search domain by choosing the predefined configuration for the type of data you want to index, or by uploading a sample of your data.
On the REVIEW INDEX CONFIGURATION step, review the index fields that will be configured. Five fields are configured automatically for the imdb-movie data: actor, director, genre, title, and year.
The actor, director, and title fields are text fields and will be searched by default if no search field is specified in a search request. The contents of those fields can also be returned in search results.
The genre field is configured as a literal field and is designated as a facet so it can be used to sort and filter the results. Because it's a facet, it cannot be returned in the search results—if you want to retrieve contents of the genre field when you search, you can configure an additional field with the same source data and make it result-enabled. (For more information, see Configuring Index Fields for an Amazon CloudSearch Domain.)
The year field is configured as a uint field. You cannot change the configuration of a uint field—uint fields are always search-enabled, facet-enabled, and result-enabled.
When you are finished reviewing the indexing options, click Continue.
On the SET UP ACCESS POLICIES step, click Recommended rules and click Continue. The recommended rules allow access to the search endpoint from all IP addresses, and restrict access to the document service to the IP address you specify.
If you do not configure access rules for your search domain, you will only be able to interact with the domain through the Amazon CloudSearch console. By default, the document service and search service endpoints are configured to block all IP addresses.
Keep in mind that if you do not have a static IP address, you must re-authorize your computer whenever your IP address changes. If your IP address is assigned dynamically, it is also likely that you're sharing that address with other computers on your network. This means that when you authorize the IP address, all computers that share it will be able to access your search domain's document service endpoint.
On the CONFIRM step, review the domain configuration and click Confirm to create your domain.
Once the domain has been created, click OK to exit the Create New Search Domain wizard and go to the domain's dashboard.
When you create a new domain, Amazon CloudSearch initializes resources for the domain, which can take around half an hour. During this initialization process, the status of the domain will be LOADING. You can begin uploading the data you want to search as soon as the domain status changes to PROCESSING. Once the status changes to ACTIVE, your domain will be fully-functional and available to process search requests.
While you can start uploading documents through the console once the domain status reaches the PROCESSING state, you won't be able to upload data through the command line tools or document service API until the domain status is ACTIVE.