Amazon CloudSearch
Developer Guide (API Version 2011-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

API

You use the DefineIndexField configuration action to add field definitions to your domain configuration. If the specified field already exists, DefineIndexField replaces it.

The type-specific options enable you to define a default value for a field, and enable or disable specific features for text and literal fields:

  • FacetEnabled—controls whether facets can be calculated for this field. Calculating facets determines how many documents contain matching values for the field. Facet counts are not automatically returned for facet-enabled fields; they must be explicitly requested at search time. (Uint fields are always facet-enabled.)

  • ResultEnabled—controls whether the contents of a text or literal field can be returned. (Uint fields are always returnable.)

  • SearchEnabled—controls whether a literal field is searchable. (Text and uint fields are always searchable.)

For example, to create a uint index field called year and populate it with the data from the yearreleased field in the SDF data:

https://cloudsearch.us-east-1.amazonaws.com
?Action=DefineIndexField
&DomainName=movies
&IndexField.IndexFieldName=year
&IndexField.IndexFieldType=uint
&IndexField.SourceAttributes.member.1.SourceDataCopy.SourceName=yearreleased
&IndexField.SourceAttributes.member.1.SourceDataFunction=Copy
&IndexField.UIntOptions.DefaultValue=0
&Version=2011-02-01
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE/20120401/us-east-1/cloudsearch/aws4_request
&X-Amz-Date=2012-04-01T17:00:07.803Z
&X-Amz-SignedHeaders=host
&X-Amz-Signature=b291a01dd69a49e04f4a84862b38e0758c53cf93b76dd452cc802886b20
724bc

Note

Amazon CloudSearch configuration requests are authenticated using your AWS credentials. For more information about signing requests, see Request Authentication.