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...

cs-configure-fields

NAME

cs-configure-fields - Define index fields for a domain.

SYNOPSIS

cs-configure-fields  --name STRING --type text|literal|uint
                     [--option search|nosearch|facet|nofacet|result|noresult]
                     [--source STRING] [--default-value NUM]
                     [--text-processor STRING] [--delete]
                     COMMON_OPTIONS
                             
DESCRIPTION

Defines the fields that will be included in a domain's index and specifies
which fields can be searched, included in search results, or used as facets.
You can also use this command to delete fields from the domain.

The --option values you can specify for a field depend on the
field type:

- text        Text fields are always searchable. You can specify the facet,
              nofacet, result, or noresult options for a text field. A text
              field can be used as a facet or returned in search results,
              but not both. By default, text fields are not facet or
              result enabled.

- literal     You can specify the search, nosearch, facet, nofacet, result,
              or noresult options for a literal field. A literal field can
              be used as a facet or returned in search results, but not both.
              By default, literal fields are not searchable, facet-enabled,
              or result enabled.

- uint        Uint fields can always be used as facets and returned in
              results. No --option values are valid for a uint field.

For more information about configuring indexing options, see the Amazon
CloudSearch Developer Guide.

COMMON OPTIONS

-a, --access-key STRING         Your AWS access key. Used in conjunction
                                with --secret-key. Required if you
                                do not use an AWS credential file.
 
-c, --aws-credential-file FILE  The path to the file that contains your AWS
                                credentials. Required if you have not
                                set the AWS_CREDENTIAL_FILE environment
                                variable or explicitly set your credentials
                                with --access-key and --secret-key. 
 
-d, --domain-name STRING        The name of the domain that you are 
                                configuring. Required.
 
-e,  --endpoint URL             The endpoint for the Amazon CloudSearch
                                Configuration Service. Defaults to the 
                                CS_ENDPOINT environment variable or
                                cloudsearch.us-east-1.amazonaws.com
                                if the environment variable is not set.
                                Optional. 
 
-h, --help                      Display this help message. Optional.
                      
-k, --secret-key STRING         Your AWS secret key. Used in conjunction with
                                --access-key. Required if you do not
                                use an AWS credential file.
 
-ve, --verbose                  Display verbose log messages. Optional.
 
-v, --version                   Display the version number of the command
                                line tools. Optional.

INDEXING OPTIONS

-dval, --default-value NUM      The default value for a uint field. This
                                value will be added to any document that
                                does not contain at least one value for
                                the field. Optional.

-del, --delete                  Delete the field specified by the --name
                                and --type options. Optional.

-fn, --name STRING              The name of the field you are configuring
                                or deleting. Field names must begin with a
                                letter and can contain the following
                                characters: a-z (lower-case letters),
                                0-9, and _ (underscore). Field names
                                must be at least 3 and no more than 28
                                characters. Required.

-fo, --option OPTION            Configures an option for the field specified
                                by the --name and --type options. Valid
                                values: search, nosearch, facet, nofacet,
                                result, noresult. Text and literal fields
                                cannot have both the facet and result
                                options enabled. By default, text and uint
                                fields are always searchable and uint fields
                                are always facet-enabled. Optional.

-fs, --source FIELD             A source field for a compound field. The
                                value of a compound field is the
                                concatenation of the values of all
                                its sources. Optional.     
                                
-tp, --text-processor STRING    The text processor to apply to a text field.
                                Valid values: cs_text_no_stemming. The
                                cs_text_no_stemming processor turns off
                                stemming for a text field. Optional.        

--type text|literal|uint        The type of the field that you are
                                configuring or deleting. Valid values:
                                text, literal, uint. Required.

EXAMPLES    

Configure index fields:

  cs-configure-fields -d mydomain --name title --type text --option result
                      COMMON_OPTIONS

  cs-configure-fields -d mydomain --name people --type text --source actor
                      --source director --text-processor cs_text_no_stemming
                      COMMON_OPTIONS

  cs-configure-fields -d mydomain --name category --type literal 
                      --options facet
                      COMMON_OPTIONS

  cs-configure-fields --name value --type uint --default-value 100
                      COMMON_OPTIONS

Delete an index field:

  cs-configure-fields -d mydomain --name obsolete_field --type index-uint 
                      --delete
                      COMMON_OPTIONS