2015/10/22 - Amazon CloudSearch - 22 new api methods
Configures a synonym dictionary for the search domain. The synonym dictionary is used during indexing to configure mappings for terms that occur in text fields. The maximum size of the synonym dictionary is 100 KB.
Request Syntax
client.update_synonym_options( DomainName='string', Synonyms='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
string
[REQUIRED]
Maps terms to their synonyms, serialized as a JSON document. The document has a single object with one property "synonyms" whose value is an object mapping terms to their synonyms. Each synonym is a simple string or an array of strings. The maximum size of a stopwords document is 100 KB. Example: { "synonyms": {"cat": ["feline", "kitten"], "puppy": "dog"} }
dict
Response Syntax
{ 'Synonyms': { 'Options': 'string', 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the status of updated synonym options.
Synonyms (dict) --
The synonym options configured for this search domain and the current status of those options.
Options (string) --
Maps terms to their synonyms, serialized as a JSON document. The document has a single object with one property "synonyms" whose value is an object mapping terms to their synonyms. Each synonym is a simple string or an array of strings. The maximum size of a stopwords document is 100 KB. Example: { "synonyms": {"cat": ["feline", "kitten"], "puppy": "dog"} }
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Permanently deletes a search domain and all of its data.
Request Syntax
client.delete_domain( DomainName='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
dict
Response Syntax
{ 'DomainStatus': { 'DomainId': 'string', 'DomainName': 'string', 'Created': True|False, 'Deleted': True|False, 'NumSearchableDocs': 123, 'DocService': { 'Arn': 'string', 'Endpoint': 'string' }, 'SearchService': { 'Arn': 'string', 'Endpoint': 'string' }, 'RequiresIndexDocuments': True|False, 'Processing': True|False, 'SearchInstanceType': 'string', 'SearchPartitionCount': 123, 'SearchInstanceCount': 123 } }
Response Structure
(dict) --
A response message that contains the status of a newly deleted domain, or no status if the domain has already been completely deleted.
DomainStatus (dict) --
The current status of the search domain.
DomainId (string) --
An internally generated unique identifier for a domain.
DomainName (string) --
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
Created (boolean) --
True if the search domain is created. It can take several minutes to initialize a domain when CreateDomain is called. Newly created search domains are returned from DescribeDomains with a false value for Created until domain creation is complete.
Deleted (boolean) --
True if the search domain has been deleted. The system must clean up resources dedicated to the search domain when DeleteDomain is called. Newly deleted search domains are returned from DescribeDomains with a true value for IsDeleted for several minutes until resource cleanup is complete.
NumSearchableDocs (integer) --
The number of documents that have been submitted to the domain and indexed.
DocService (dict) --
The service endpoint for updating documents in a search domain.
Arn (string) --
An Amazon Resource Name (ARN). See Identifiers for IAM Entities in Using AWS Identity and Access Management for more information.
Endpoint (string) --
The URL (including /version/pathPrefix) to which service requests can be submitted.
SearchService (dict) --
The service endpoint for requesting search results from a search domain.
Arn (string) --
An Amazon Resource Name (ARN). See Identifiers for IAM Entities in Using AWS Identity and Access Management for more information.
Endpoint (string) --
The URL (including /version/pathPrefix) to which service requests can be submitted.
RequiresIndexDocuments (boolean) --
True if IndexDocuments needs to be called to activate the current domain configuration.
Processing (boolean) --
True if processing is being done to activate the current domain configuration.
SearchInstanceType (string) --
The instance type (such as search.m1.small) that is being used to process search requests.
SearchPartitionCount (integer) --
The number of partitions across which the search index is spread.
SearchInstanceCount (integer) --
The number of search instances that are available to process search requests.
Gets information about the index fields configured for the search domain. Can be limited to specific fields by name. Shows all fields by default.
Request Syntax
client.describe_index_fields( DomainName='string', FieldNames=[ 'string', ] )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
list
Limits the DescribeIndexFields response to the specified fields.
(string) --
A string that represents the name of an index field. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
dict
Response Syntax
{ 'IndexFields': [ { 'Options': { 'IndexFieldName': 'string', 'IndexFieldType': 'uint'|'literal'|'text', 'UIntOptions': { 'DefaultValue': 123 }, 'LiteralOptions': { 'DefaultValue': 'string', 'SearchEnabled': True|False, 'FacetEnabled': True|False, 'ResultEnabled': True|False }, 'TextOptions': { 'DefaultValue': 'string', 'FacetEnabled': True|False, 'ResultEnabled': True|False, 'TextProcessor': 'string' }, 'SourceAttributes': [ { 'SourceDataFunction': 'Copy'|'TrimTitle'|'Map', 'SourceDataCopy': { 'SourceName': 'string', 'DefaultValue': 'string' }, 'SourceDataTrimTitle': { 'SourceName': 'string', 'DefaultValue': 'string', 'Separator': 'string', 'Language': 'string' }, 'SourceDataMap': { 'SourceName': 'string', 'DefaultValue': 'string', 'Cases': { 'string': 'string' } } }, ] }, 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } }, ] }
Response Structure
(dict) --
A response message that contains the index fields for a search domain.
IndexFields (list) --
The index fields configured for the domain.
(dict) --
The value of an IndexField and its current status.
Options (dict) --
Defines a field in the index, including its name, type, and the source of its data. The IndexFieldType indicates which of the options will be present. It is invalid to specify options for a type other than the IndexFieldType.
IndexFieldName (string) --
The name of a field in the search index. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
IndexFieldType (string) --
The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.
UIntOptions (dict) --
Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.
DefaultValue (integer) --
The default value for an unsigned integer field. Optional.
LiteralOptions (dict) --
Options for literal field. Present if IndexFieldType specifies the field is of type literal.
DefaultValue (string) --
The default value for a literal field. Optional.
SearchEnabled (boolean) --
Specifies whether search is enabled for this field. Default: False.
FacetEnabled (boolean) --
Specifies whether facets are enabled for this field. Default: False.
ResultEnabled (boolean) --
Specifies whether values of this field can be returned in search results and used for ranking. Default: False.
TextOptions (dict) --
Options for text field. Present if IndexFieldType specifies the field is of type text.
DefaultValue (string) --
The default value for a text field. Optional.
FacetEnabled (boolean) --
Specifies whether facets are enabled for this field. Default: False.
ResultEnabled (boolean) --
Specifies whether values of this field can be returned in search results and used for ranking. Default: False.
TextProcessor (string) --
The text processor to apply to this field. Optional. Possible values:
cs_text_no_stemming: turns off stemming for the field.
Default: none
SourceAttributes (list) --
An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.
(dict) --
Identifies the source data for an index field. An optional data transformation can be applied to the source data when populating the index field. By default, the value of the source attribute is copied to the index field.
SourceDataFunction (string) --
Identifies the transformation to apply when copying data from a source attribute.
SourceDataCopy (dict) --
Copies data from a source document attribute to an IndexField.
SourceName (string) --
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
SourceDataTrimTitle (dict) --
Trims common title words from a source document attribute when populating an IndexField. This can be used to create an IndexField you can use for sorting.
SourceName (string) --
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
Separator (string) --
The separator that follows the text to trim.
Language (string) --
An IETF RFC 4646 language code. Only the primary language is considered. English (en) is currently the only supported language.
SourceDataMap (dict) --
Maps source document attribute values to new values when populating the IndexField.
SourceName (string) --
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
Cases (dict) --
A map that translates source field values to custom values.
(string) --
The value of a field or source document attribute.
(string) --
The value of a field or source document attribute.
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Creates a new search domain.
Request Syntax
client.create_domain( DomainName='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
dict
Response Syntax
{ 'DomainStatus': { 'DomainId': 'string', 'DomainName': 'string', 'Created': True|False, 'Deleted': True|False, 'NumSearchableDocs': 123, 'DocService': { 'Arn': 'string', 'Endpoint': 'string' }, 'SearchService': { 'Arn': 'string', 'Endpoint': 'string' }, 'RequiresIndexDocuments': True|False, 'Processing': True|False, 'SearchInstanceType': 'string', 'SearchPartitionCount': 123, 'SearchInstanceCount': 123 } }
Response Structure
(dict) --
A response message that contains the status of a newly created domain.
DomainStatus (dict) --
The current status of the search domain.
DomainId (string) --
An internally generated unique identifier for a domain.
DomainName (string) --
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
Created (boolean) --
True if the search domain is created. It can take several minutes to initialize a domain when CreateDomain is called. Newly created search domains are returned from DescribeDomains with a false value for Created until domain creation is complete.
Deleted (boolean) --
True if the search domain has been deleted. The system must clean up resources dedicated to the search domain when DeleteDomain is called. Newly deleted search domains are returned from DescribeDomains with a true value for IsDeleted for several minutes until resource cleanup is complete.
NumSearchableDocs (integer) --
The number of documents that have been submitted to the domain and indexed.
DocService (dict) --
The service endpoint for updating documents in a search domain.
Arn (string) --
An Amazon Resource Name (ARN). See Identifiers for IAM Entities in Using AWS Identity and Access Management for more information.
Endpoint (string) --
The URL (including /version/pathPrefix) to which service requests can be submitted.
SearchService (dict) --
The service endpoint for requesting search results from a search domain.
Arn (string) --
An Amazon Resource Name (ARN). See Identifiers for IAM Entities in Using AWS Identity and Access Management for more information.
Endpoint (string) --
The URL (including /version/pathPrefix) to which service requests can be submitted.
RequiresIndexDocuments (boolean) --
True if IndexDocuments needs to be called to activate the current domain configuration.
Processing (boolean) --
True if processing is being done to activate the current domain configuration.
SearchInstanceType (string) --
The instance type (such as search.m1.small) that is being used to process search requests.
SearchPartitionCount (integer) --
The number of partitions across which the search index is spread.
SearchInstanceCount (integer) --
The number of search instances that are available to process search requests.
Removes a RankExpression from the search domain.
Request Syntax
client.delete_rank_expression( DomainName='string', RankName='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
string
[REQUIRED]
The name of the RankExpression to delete.
dict
Response Syntax
{ 'RankExpression': { 'Options': { 'RankName': 'string', 'RankExpression': 'string' }, 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the status of a deleted RankExpression.
RankExpression (dict) --
The value of a RankExpression and its current status.
Options (dict) --
The expression that is evaluated for ranking or thresholding while processing a search request.
RankName (string) --
The name of a rank expression. Rank expression names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
RankExpression (string) --
The expression to evaluate for ranking or thresholding while processing a search request. The RankExpression syntax is based on JavaScript expressions and supports:
Integer, floating point, hex and octal literals
Shortcut evaluation of logical operators such that an expression a || b evaluates to the value a, if a is true, without evaluating b at all
JavaScript order of precedence for operators
Arithmetic operators: + - * / %
Boolean operators (including the ternary operator)
Bitwise operators
Comparison operators
Common mathematic functions: abs ceil erf exp floor lgamma ln log2 log10 max min sqrt pow
Trigonometric library functions: acosh acos asinh asin atanh atan cosh cos sinh sin tanh tan
Random generation of a number between 0 and 1: rand
Current time in epoch: time
The min max functions that operate on a variable argument list
Intermediate results are calculated as double precision floating point values. The final return value of a RankExpression is automatically converted from floating point to a 32-bit unsigned integer by rounding to the nearest integer, with a natural floor of 0 and a ceiling of max(uint32_t), 4294967295. Mathematical errors such as dividing by 0 will fail during evaluation and return a value of 0.
The source data for a RankExpression can be the name of an IndexField of type uint, another RankExpression or the reserved name text_relevance. The text_relevance source is defined to return an integer from 0 to 1000 (inclusive) to indicate how relevant a document is to the search request, taking into account repetition of search terms in the document and proximity of search terms to each other in each matching IndexField in the document.
For more information about using rank expressions to customize ranking, see the Amazon CloudSearch Developer Guide.
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Gets the default search field configured for the search domain.
Request Syntax
client.describe_default_search_field( DomainName='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
dict
Response Syntax
{ 'DefaultSearchField': { 'Options': 'string', 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the default search field for a search domain.
DefaultSearchField (dict) --
The name of the IndexField to use for search requests issued with the q parameter. The default is the empty string, which automatically searches all text fields.
Options (string) --
The name of the IndexField to use as the default search field. The default is an empty string, which automatically searches all text fields.
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Gets information about the resource-based policies that control access to the domain's document and search services.
Request Syntax
client.describe_service_access_policies( DomainName='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
dict
Response Syntax
{ 'AccessPolicies': { 'Options': 'string', 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the access policies for a domain.
AccessPolicies (dict) --
A PolicyDocument that specifies access policies for the search domain's services, and the current status of those policies.
Options (string) --
An IAM access policy as described in The Access Policy Language in Using AWS Identity and Access Management. The maximum size of an access policy document is 100 KB.
Example: {"Statement": [{"Effect":"Allow", "Action": "*", "Resource": "arn:aws:cs:us-east-1:1234567890:search/movies", "Condition": { "IpAddress": { "aws:SourceIp": ["203.0.113.1/32"] } }}, {"Effect":"Allow", "Action": "*", "Resource": "arn:aws:cs:us-east-1:1234567890:documents/movies", "Condition": { "IpAddress": { "aws:SourceIp": ["203.0.113.1/32"] } }} ] }
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Gets the stemming dictionary configured for the search domain.
Request Syntax
client.describe_stemming_options( DomainName='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
dict
Response Syntax
{ 'Stems': { 'Options': 'string', 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the stemming options for a search domain.
Stems (dict) --
The stemming options configured for this search domain and the current status of those options.
Options (string) --
Maps terms to their stems, serialized as a JSON document. The document has a single object with one property "stems" whose value is an object mapping terms to their stems. The maximum size of a stemming document is 500 KB. Example: { "stems": {"people": "person", "walking": "walk"} }
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Gets the synonym dictionary configured for the search domain.
Request Syntax
client.describe_synonym_options( DomainName='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
dict
Response Syntax
{ 'Synonyms': { 'Options': 'string', 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the synonym options for a search domain.
Synonyms (dict) --
The synonym options configured for this search domain and the current status of those options.
Options (string) --
Maps terms to their synonyms, serialized as a JSON document. The document has a single object with one property "synonyms" whose value is an object mapping terms to their synonyms. Each synonym is a simple string or an array of strings. The maximum size of a stopwords document is 100 KB. Example: { "synonyms": {"cat": ["feline", "kitten"], "puppy": "dog"} }
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Removes an IndexField from the search domain.
Request Syntax
client.delete_index_field( DomainName='string', IndexFieldName='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
string
[REQUIRED]
A string that represents the name of an index field. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
dict
Response Syntax
{ 'IndexField': { 'Options': { 'IndexFieldName': 'string', 'IndexFieldType': 'uint'|'literal'|'text', 'UIntOptions': { 'DefaultValue': 123 }, 'LiteralOptions': { 'DefaultValue': 'string', 'SearchEnabled': True|False, 'FacetEnabled': True|False, 'ResultEnabled': True|False }, 'TextOptions': { 'DefaultValue': 'string', 'FacetEnabled': True|False, 'ResultEnabled': True|False, 'TextProcessor': 'string' }, 'SourceAttributes': [ { 'SourceDataFunction': 'Copy'|'TrimTitle'|'Map', 'SourceDataCopy': { 'SourceName': 'string', 'DefaultValue': 'string' }, 'SourceDataTrimTitle': { 'SourceName': 'string', 'DefaultValue': 'string', 'Separator': 'string', 'Language': 'string' }, 'SourceDataMap': { 'SourceName': 'string', 'DefaultValue': 'string', 'Cases': { 'string': 'string' } } }, ] }, 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the status of a deleted index field.
IndexField (dict) --
The value of an IndexField and its current status.
Options (dict) --
Defines a field in the index, including its name, type, and the source of its data. The IndexFieldType indicates which of the options will be present. It is invalid to specify options for a type other than the IndexFieldType.
IndexFieldName (string) --
The name of a field in the search index. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
IndexFieldType (string) --
The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.
UIntOptions (dict) --
Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.
DefaultValue (integer) --
The default value for an unsigned integer field. Optional.
LiteralOptions (dict) --
Options for literal field. Present if IndexFieldType specifies the field is of type literal.
DefaultValue (string) --
The default value for a literal field. Optional.
SearchEnabled (boolean) --
Specifies whether search is enabled for this field. Default: False.
FacetEnabled (boolean) --
Specifies whether facets are enabled for this field. Default: False.
ResultEnabled (boolean) --
Specifies whether values of this field can be returned in search results and used for ranking. Default: False.
TextOptions (dict) --
Options for text field. Present if IndexFieldType specifies the field is of type text.
DefaultValue (string) --
The default value for a text field. Optional.
FacetEnabled (boolean) --
Specifies whether facets are enabled for this field. Default: False.
ResultEnabled (boolean) --
Specifies whether values of this field can be returned in search results and used for ranking. Default: False.
TextProcessor (string) --
The text processor to apply to this field. Optional. Possible values:
cs_text_no_stemming: turns off stemming for the field.
Default: none
SourceAttributes (list) --
An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.
(dict) --
Identifies the source data for an index field. An optional data transformation can be applied to the source data when populating the index field. By default, the value of the source attribute is copied to the index field.
SourceDataFunction (string) --
Identifies the transformation to apply when copying data from a source attribute.
SourceDataCopy (dict) --
Copies data from a source document attribute to an IndexField.
SourceName (string) --
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
SourceDataTrimTitle (dict) --
Trims common title words from a source document attribute when populating an IndexField. This can be used to create an IndexField you can use for sorting.
SourceName (string) --
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
Separator (string) --
The separator that follows the text to trim.
Language (string) --
An IETF RFC 4646 language code. Only the primary language is considered. English (en) is currently the only supported language.
SourceDataMap (dict) --
Maps source document attribute values to new values when populating the IndexField.
SourceName (string) --
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
Cases (dict) --
A map that translates source field values to custom values.
(string) --
The value of a field or source document attribute.
(string) --
The value of a field or source document attribute.
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Configures the default search field for the search domain. The default search field is the text field that is searched when a search request does not specify which fields to search. By default, it is configured to include the contents of all of the domain's text fields.
Request Syntax
client.update_default_search_field( DomainName='string', DefaultSearchField='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
string
[REQUIRED]
The text field to search if the search request does not specify which field to search. The default search field is used when search terms are specified with the q parameter, or if a match expression specified with the bq parameter does not constrain the search to a particular field. The default is an empty string, which automatically searches all text fields.
dict
Response Syntax
{ 'DefaultSearchField': { 'Options': 'string', 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the status of an updated default search field.
DefaultSearchField (dict) --
The value of the DefaultSearchField configured for this search domain and its current status.
Options (string) --
The name of the IndexField to use as the default search field. The default is an empty string, which automatically searches all text fields.
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Gets the availability options configured for a domain. By default, shows the configuration with any pending changes. Set the Deployed option to true to show the active configuration and exclude pending changes. For more information, see Configuring Availability Options in the Amazon CloudSearch Developer Guide.
Request Syntax
client.describe_availability_options( DomainName='string' )
string
[REQUIRED]
The name of the domain you want to describe.
dict
Response Syntax
{ 'AvailabilityOptions': { 'Options': True|False, 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
The result of a DescribeAvailabilityOptions request. Indicates whether or not the Multi-AZ option is enabled for the domain specified in the request.
AvailabilityOptions (dict) --
The availability options configured for the domain. Indicates whether Multi-AZ is enabled for the domain.
Options (boolean) --
The availability options configured for the domain.
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Configures a RankExpression for the search domain. Used to create new rank expressions and modify existing ones. If the expression exists, the new configuration replaces the old one. You can configure a maximum of 50 rank expressions.
Request Syntax
client.define_rank_expression( DomainName='string', RankExpression={ 'RankName': 'string', 'RankExpression': 'string' } )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
dict
[REQUIRED]
A named expression that can be evaluated at search time and used for ranking or thresholding in a search query.
RankName (string) -- [REQUIRED]
The name of a rank expression. Rank expression names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
RankExpression (string) -- [REQUIRED]
The expression to evaluate for ranking or thresholding while processing a search request. The RankExpression syntax is based on JavaScript expressions and supports:
Integer, floating point, hex and octal literals
Shortcut evaluation of logical operators such that an expression a || b evaluates to the value a, if a is true, without evaluating b at all
JavaScript order of precedence for operators
Arithmetic operators: + - * / %
Boolean operators (including the ternary operator)
Bitwise operators
Comparison operators
Common mathematic functions: abs ceil erf exp floor lgamma ln log2 log10 max min sqrt pow
Trigonometric library functions: acosh acos asinh asin atanh atan cosh cos sinh sin tanh tan
Random generation of a number between 0 and 1: rand
Current time in epoch: time
The min max functions that operate on a variable argument list
Intermediate results are calculated as double precision floating point values. The final return value of a RankExpression is automatically converted from floating point to a 32-bit unsigned integer by rounding to the nearest integer, with a natural floor of 0 and a ceiling of max(uint32_t), 4294967295. Mathematical errors such as dividing by 0 will fail during evaluation and return a value of 0.
The source data for a RankExpression can be the name of an IndexField of type uint, another RankExpression or the reserved name text_relevance. The text_relevance source is defined to return an integer from 0 to 1000 (inclusive) to indicate how relevant a document is to the search request, taking into account repetition of search terms in the document and proximity of search terms to each other in each matching IndexField in the document.
For more information about using rank expressions to customize ranking, see the Amazon CloudSearch Developer Guide.
dict
Response Syntax
{ 'RankExpression': { 'Options': { 'RankName': 'string', 'RankExpression': 'string' }, 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the status of an updated RankExpression.
RankExpression (dict) --
The value of a RankExpression and its current status.
Options (dict) --
The expression that is evaluated for ranking or thresholding while processing a search request.
RankName (string) --
The name of a rank expression. Rank expression names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
RankExpression (string) --
The expression to evaluate for ranking or thresholding while processing a search request. The RankExpression syntax is based on JavaScript expressions and supports:
Integer, floating point, hex and octal literals
Shortcut evaluation of logical operators such that an expression a || b evaluates to the value a, if a is true, without evaluating b at all
JavaScript order of precedence for operators
Arithmetic operators: + - * / %
Boolean operators (including the ternary operator)
Bitwise operators
Comparison operators
Common mathematic functions: abs ceil erf exp floor lgamma ln log2 log10 max min sqrt pow
Trigonometric library functions: acosh acos asinh asin atanh atan cosh cos sinh sin tanh tan
Random generation of a number between 0 and 1: rand
Current time in epoch: time
The min max functions that operate on a variable argument list
Intermediate results are calculated as double precision floating point values. The final return value of a RankExpression is automatically converted from floating point to a 32-bit unsigned integer by rounding to the nearest integer, with a natural floor of 0 and a ceiling of max(uint32_t), 4294967295. Mathematical errors such as dividing by 0 will fail during evaluation and return a value of 0.
The source data for a RankExpression can be the name of an IndexField of type uint, another RankExpression or the reserved name text_relevance. The text_relevance source is defined to return an integer from 0 to 1000 (inclusive) to indicate how relevant a document is to the search request, taking into account repetition of search terms in the document and proximity of search terms to each other in each matching IndexField in the document.
For more information about using rank expressions to customize ranking, see the Amazon CloudSearch Developer Guide.
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Configures the policies that control access to the domain's document and search services. The maximum size of an access policy document is 100 KB.
Request Syntax
client.update_service_access_policies( DomainName='string', AccessPolicies='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
string
[REQUIRED]
An IAM access policy as described in The Access Policy Language in Using AWS Identity and Access Management. The maximum size of an access policy document is 100 KB.
Example: {"Statement": [{"Effect":"Allow", "Action": "*", "Resource": "arn:aws:cs:us-east-1:1234567890:search/movies", "Condition": { "IpAddress": { "aws:SourceIp": ["203.0.113.1/32"] } }}, {"Effect":"Allow", "Action": "*", "Resource": "arn:aws:cs:us-east-1:1234567890:documents/movies", "Condition": { "IpAddress": { "aws:SourceIp": ["203.0.113.1/32"] } }} ] }
dict
Response Syntax
{ 'AccessPolicies': { 'Options': 'string', 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the status of updated access policies.
AccessPolicies (dict) --
A PolicyDocument that specifies access policies for the search domain's services, and the current status of those policies.
Options (string) --
An IAM access policy as described in The Access Policy Language in Using AWS Identity and Access Management. The maximum size of an access policy document is 100 KB.
Example: {"Statement": [{"Effect":"Allow", "Action": "*", "Resource": "arn:aws:cs:us-east-1:1234567890:search/movies", "Condition": { "IpAddress": { "aws:SourceIp": ["203.0.113.1/32"] } }}, {"Effect":"Allow", "Action": "*", "Resource": "arn:aws:cs:us-east-1:1234567890:documents/movies", "Condition": { "IpAddress": { "aws:SourceIp": ["203.0.113.1/32"] } }} ] }
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Configures stopwords for the search domain. Stopwords are used during indexing and when processing search requests. The maximum size of the stopwords dictionary is 10 KB.
Request Syntax
client.update_stopword_options( DomainName='string', Stopwords='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
string
[REQUIRED]
Lists stopwords serialized as a JSON document. The document has a single object with one property "stopwords" whose value is an array of strings. The maximum size of a stopwords document is 10 KB. Example: { "stopwords": ["a", "an", "the", "of"] }
dict
Response Syntax
{ 'Stopwords': { 'Options': 'string', 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the status of updated stopword options.
Stopwords (dict) --
The stopword options configured for this search domain and the current status of those options.
Options (string) --
Lists stopwords serialized as a JSON document. The document has a single object with one property "stopwords" whose value is an array of strings. The maximum size of a stopwords document is 10 KB. Example: { "stopwords": ["a", "an", "the", "of"] }
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Tells the search domain to start indexing its documents using the latest text processing options and IndexFields. This operation must be invoked to make options whose OptionStatus has OptionState of RequiresIndexDocuments visible in search results.
Request Syntax
client.index_documents( DomainName='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
dict
Response Syntax
{ 'FieldNames': [ 'string', ] }
Response Structure
(dict) --
The result of an IndexDocuments action.
FieldNames (list) --
The names of the fields that are currently being processed due to an IndexDocuments action.
(string) --
A string that represents the name of an index field. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
Configures an IndexField for the search domain. Used to create new fields and modify existing ones. If the field exists, the new configuration replaces the old one. You can configure a maximum of 200 index fields.
Request Syntax
client.define_index_field( DomainName='string', IndexField={ 'IndexFieldName': 'string', 'IndexFieldType': 'uint'|'literal'|'text', 'UIntOptions': { 'DefaultValue': 123 }, 'LiteralOptions': { 'DefaultValue': 'string', 'SearchEnabled': True|False, 'FacetEnabled': True|False, 'ResultEnabled': True|False }, 'TextOptions': { 'DefaultValue': 'string', 'FacetEnabled': True|False, 'ResultEnabled': True|False, 'TextProcessor': 'string' }, 'SourceAttributes': [ { 'SourceDataFunction': 'Copy'|'TrimTitle'|'Map', 'SourceDataCopy': { 'SourceName': 'string', 'DefaultValue': 'string' }, 'SourceDataTrimTitle': { 'SourceName': 'string', 'DefaultValue': 'string', 'Separator': 'string', 'Language': 'string' }, 'SourceDataMap': { 'SourceName': 'string', 'DefaultValue': 'string', 'Cases': { 'string': 'string' } } }, ] } )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
dict
[REQUIRED]
Defines a field in the index, including its name, type, and the source of its data. The IndexFieldType indicates which of the options will be present. It is invalid to specify options for a type other than the IndexFieldType.
IndexFieldName (string) -- [REQUIRED]
The name of a field in the search index. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
IndexFieldType (string) -- [REQUIRED]
The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.
UIntOptions (dict) --
Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.
DefaultValue (integer) --
The default value for an unsigned integer field. Optional.
LiteralOptions (dict) --
Options for literal field. Present if IndexFieldType specifies the field is of type literal.
DefaultValue (string) --
The default value for a literal field. Optional.
SearchEnabled (boolean) --
Specifies whether search is enabled for this field. Default: False.
FacetEnabled (boolean) --
Specifies whether facets are enabled for this field. Default: False.
ResultEnabled (boolean) --
Specifies whether values of this field can be returned in search results and used for ranking. Default: False.
TextOptions (dict) --
Options for text field. Present if IndexFieldType specifies the field is of type text.
DefaultValue (string) --
The default value for a text field. Optional.
FacetEnabled (boolean) --
Specifies whether facets are enabled for this field. Default: False.
ResultEnabled (boolean) --
Specifies whether values of this field can be returned in search results and used for ranking. Default: False.
TextProcessor (string) --
The text processor to apply to this field. Optional. Possible values:
cs_text_no_stemming: turns off stemming for the field.
Default: none
SourceAttributes (list) --
An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.
(dict) --
Identifies the source data for an index field. An optional data transformation can be applied to the source data when populating the index field. By default, the value of the source attribute is copied to the index field.
SourceDataFunction (string) -- [REQUIRED]
Identifies the transformation to apply when copying data from a source attribute.
SourceDataCopy (dict) --
Copies data from a source document attribute to an IndexField.
SourceName (string) -- [REQUIRED]
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
SourceDataTrimTitle (dict) --
Trims common title words from a source document attribute when populating an IndexField. This can be used to create an IndexField you can use for sorting.
SourceName (string) -- [REQUIRED]
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
Separator (string) --
The separator that follows the text to trim.
Language (string) --
An IETF RFC 4646 language code. Only the primary language is considered. English (en) is currently the only supported language.
SourceDataMap (dict) --
Maps source document attribute values to new values when populating the IndexField.
SourceName (string) -- [REQUIRED]
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
Cases (dict) --
A map that translates source field values to custom values.
(string) --
The value of a field or source document attribute.
(string) --
The value of a field or source document attribute.
dict
Response Syntax
{ 'IndexField': { 'Options': { 'IndexFieldName': 'string', 'IndexFieldType': 'uint'|'literal'|'text', 'UIntOptions': { 'DefaultValue': 123 }, 'LiteralOptions': { 'DefaultValue': 'string', 'SearchEnabled': True|False, 'FacetEnabled': True|False, 'ResultEnabled': True|False }, 'TextOptions': { 'DefaultValue': 'string', 'FacetEnabled': True|False, 'ResultEnabled': True|False, 'TextProcessor': 'string' }, 'SourceAttributes': [ { 'SourceDataFunction': 'Copy'|'TrimTitle'|'Map', 'SourceDataCopy': { 'SourceName': 'string', 'DefaultValue': 'string' }, 'SourceDataTrimTitle': { 'SourceName': 'string', 'DefaultValue': 'string', 'Separator': 'string', 'Language': 'string' }, 'SourceDataMap': { 'SourceName': 'string', 'DefaultValue': 'string', 'Cases': { 'string': 'string' } } }, ] }, 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the status of an updated index field.
IndexField (dict) --
The value of an IndexField and its current status.
Options (dict) --
Defines a field in the index, including its name, type, and the source of its data. The IndexFieldType indicates which of the options will be present. It is invalid to specify options for a type other than the IndexFieldType.
IndexFieldName (string) --
The name of a field in the search index. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
IndexFieldType (string) --
The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.
UIntOptions (dict) --
Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.
DefaultValue (integer) --
The default value for an unsigned integer field. Optional.
LiteralOptions (dict) --
Options for literal field. Present if IndexFieldType specifies the field is of type literal.
DefaultValue (string) --
The default value for a literal field. Optional.
SearchEnabled (boolean) --
Specifies whether search is enabled for this field. Default: False.
FacetEnabled (boolean) --
Specifies whether facets are enabled for this field. Default: False.
ResultEnabled (boolean) --
Specifies whether values of this field can be returned in search results and used for ranking. Default: False.
TextOptions (dict) --
Options for text field. Present if IndexFieldType specifies the field is of type text.
DefaultValue (string) --
The default value for a text field. Optional.
FacetEnabled (boolean) --
Specifies whether facets are enabled for this field. Default: False.
ResultEnabled (boolean) --
Specifies whether values of this field can be returned in search results and used for ranking. Default: False.
TextProcessor (string) --
The text processor to apply to this field. Optional. Possible values:
cs_text_no_stemming: turns off stemming for the field.
Default: none
SourceAttributes (list) --
An optional list of source attributes that provide data for this index field. If not specified, the data is pulled from a source attribute with the same name as this IndexField. When one or more source attributes are specified, an optional data transformation can be applied to the source data when populating the index field. You can configure a maximum of 20 sources for an IndexField.
(dict) --
Identifies the source data for an index field. An optional data transformation can be applied to the source data when populating the index field. By default, the value of the source attribute is copied to the index field.
SourceDataFunction (string) --
Identifies the transformation to apply when copying data from a source attribute.
SourceDataCopy (dict) --
Copies data from a source document attribute to an IndexField.
SourceName (string) --
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
SourceDataTrimTitle (dict) --
Trims common title words from a source document attribute when populating an IndexField. This can be used to create an IndexField you can use for sorting.
SourceName (string) --
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
Separator (string) --
The separator that follows the text to trim.
Language (string) --
An IETF RFC 4646 language code. Only the primary language is considered. English (en) is currently the only supported language.
SourceDataMap (dict) --
Maps source document attribute values to new values when populating the IndexField.
SourceName (string) --
The name of the document source field to add to this IndexField.
DefaultValue (string) --
The default value to use if the source attribute is not specified in a document. Optional.
Cases (dict) --
A map that translates source field values to custom values.
(string) --
The value of a field or source document attribute.
(string) --
The value of a field or source document attribute.
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Gets the rank expressions configured for the search domain. Can be limited to specific rank expressions by name. Shows all rank expressions by default.
Request Syntax
client.describe_rank_expressions( DomainName='string', RankNames=[ 'string', ] )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
list
Limits the DescribeRankExpressions response to the specified fields.
(string) --
A string that represents the name of an index field. Field names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
dict
Response Syntax
{ 'RankExpressions': [ { 'Options': { 'RankName': 'string', 'RankExpression': 'string' }, 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } }, ] }
Response Structure
(dict) --
A response message that contains the rank expressions for a search domain.
RankExpressions (list) --
The rank expressions configured for the domain.
(dict) --
The value of a RankExpression and its current status.
Options (dict) --
The expression that is evaluated for ranking or thresholding while processing a search request.
RankName (string) --
The name of a rank expression. Rank expression names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Uppercase letters and hyphens are not allowed. The names "body", "docid", and "text_relevance" are reserved and cannot be specified as field or rank expression names.
RankExpression (string) --
The expression to evaluate for ranking or thresholding while processing a search request. The RankExpression syntax is based on JavaScript expressions and supports:
Integer, floating point, hex and octal literals
Shortcut evaluation of logical operators such that an expression a || b evaluates to the value a, if a is true, without evaluating b at all
JavaScript order of precedence for operators
Arithmetic operators: + - * / %
Boolean operators (including the ternary operator)
Bitwise operators
Comparison operators
Common mathematic functions: abs ceil erf exp floor lgamma ln log2 log10 max min sqrt pow
Trigonometric library functions: acosh acos asinh asin atanh atan cosh cos sinh sin tanh tan
Random generation of a number between 0 and 1: rand
Current time in epoch: time
The min max functions that operate on a variable argument list
Intermediate results are calculated as double precision floating point values. The final return value of a RankExpression is automatically converted from floating point to a 32-bit unsigned integer by rounding to the nearest integer, with a natural floor of 0 and a ceiling of max(uint32_t), 4294967295. Mathematical errors such as dividing by 0 will fail during evaluation and return a value of 0.
The source data for a RankExpression can be the name of an IndexField of type uint, another RankExpression or the reserved name text_relevance. The text_relevance source is defined to return an integer from 0 to 1000 (inclusive) to indicate how relevant a document is to the search request, taking into account repetition of search terms in the document and proximity of search terms to each other in each matching IndexField in the document.
For more information about using rank expressions to customize ranking, see the Amazon CloudSearch Developer Guide.
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Gets information about the search domains owned by this account. Can be limited to specific domains. Shows all domains by default.
Request Syntax
client.describe_domains( DomainNames=[ 'string', ] )
list
Limits the DescribeDomains response to the specified search domains.
(string) --
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
dict
Response Syntax
{ 'DomainStatusList': [ { 'DomainId': 'string', 'DomainName': 'string', 'Created': True|False, 'Deleted': True|False, 'NumSearchableDocs': 123, 'DocService': { 'Arn': 'string', 'Endpoint': 'string' }, 'SearchService': { 'Arn': 'string', 'Endpoint': 'string' }, 'RequiresIndexDocuments': True|False, 'Processing': True|False, 'SearchInstanceType': 'string', 'SearchPartitionCount': 123, 'SearchInstanceCount': 123 }, ] }
Response Structure
(dict) --
A response message that contains the status of one or more domains.
DomainStatusList (list) --
The current status of all of your search domains.
(dict) --
The current status of the search domain.
DomainId (string) --
An internally generated unique identifier for a domain.
DomainName (string) --
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
Created (boolean) --
True if the search domain is created. It can take several minutes to initialize a domain when CreateDomain is called. Newly created search domains are returned from DescribeDomains with a false value for Created until domain creation is complete.
Deleted (boolean) --
True if the search domain has been deleted. The system must clean up resources dedicated to the search domain when DeleteDomain is called. Newly deleted search domains are returned from DescribeDomains with a true value for IsDeleted for several minutes until resource cleanup is complete.
NumSearchableDocs (integer) --
The number of documents that have been submitted to the domain and indexed.
DocService (dict) --
The service endpoint for updating documents in a search domain.
Arn (string) --
An Amazon Resource Name (ARN). See Identifiers for IAM Entities in Using AWS Identity and Access Management for more information.
Endpoint (string) --
The URL (including /version/pathPrefix) to which service requests can be submitted.
SearchService (dict) --
The service endpoint for requesting search results from a search domain.
Arn (string) --
An Amazon Resource Name (ARN). See Identifiers for IAM Entities in Using AWS Identity and Access Management for more information.
Endpoint (string) --
The URL (including /version/pathPrefix) to which service requests can be submitted.
RequiresIndexDocuments (boolean) --
True if IndexDocuments needs to be called to activate the current domain configuration.
Processing (boolean) --
True if processing is being done to activate the current domain configuration.
SearchInstanceType (string) --
The instance type (such as search.m1.small) that is being used to process search requests.
SearchPartitionCount (integer) --
The number of partitions across which the search index is spread.
SearchInstanceCount (integer) --
The number of search instances that are available to process search requests.
Configures a stemming dictionary for the search domain. The stemming dictionary is used during indexing and when processing search requests. The maximum size of the stemming dictionary is 500 KB.
Request Syntax
client.update_stemming_options( DomainName='string', Stems='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
string
[REQUIRED]
Maps terms to their stems, serialized as a JSON document. The document has a single object with one property "stems" whose value is an object mapping terms to their stems. The maximum size of a stemming document is 500 KB. Example: { "stems": {"people": "person", "walking": "walk"} }
dict
Response Syntax
{ 'Stems': { 'Options': 'string', 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the status of updated stemming options.
Stems (dict) --
The stemming options configured for this search domain and the current status of those options.
Options (string) --
Maps terms to their stems, serialized as a JSON document. The document has a single object with one property "stems" whose value is an object mapping terms to their stems. The maximum size of a stemming document is 500 KB. Example: { "stems": {"people": "person", "walking": "walk"} }
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Configures the availability options for a domain. Enabling the Multi-AZ option expands an Amazon CloudSearch domain to an additional Availability Zone in the same Region to increase fault tolerance in the event of a service disruption. Changes to the Multi-AZ option can take about half an hour to become active. For more information, see Configuring Availability Options in the Amazon CloudSearch Developer Guide.
Request Syntax
client.update_availability_options( DomainName='string', MultiAZ=True|False )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
boolean
[REQUIRED]
You expand an existing search domain to a second Availability Zone by setting the Multi-AZ option to true. Similarly, you can turn off the Multi-AZ option to downgrade the domain to a single Availability Zone by setting the Multi-AZ option to false.
dict
Response Syntax
{ 'AvailabilityOptions': { 'Options': True|False, 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
The result of a UpdateAvailabilityOptions request. Contains the status of the domain's availability options.
AvailabilityOptions (dict) --
The newly-configured availability options. Indicates whether Multi-AZ is enabled for the domain.
Options (boolean) --
The availability options configured for the domain.
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.
Gets the stopwords configured for the search domain.
Request Syntax
client.describe_stopword_options( DomainName='string' )
string
[REQUIRED]
A string that represents the name of a domain. Domain names must be unique across the domains owned by an account within an AWS region. Domain names must start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen). Uppercase letters and underscores are not allowed.
dict
Response Syntax
{ 'Stopwords': { 'Options': 'string', 'Status': { 'CreationDate': datetime(2015, 1, 1), 'UpdateDate': datetime(2015, 1, 1), 'UpdateVersion': 123, 'State': 'RequiresIndexDocuments'|'Processing'|'Active', 'PendingDeletion': True|False } } }
Response Structure
(dict) --
A response message that contains the stopword options for a search domain.
Stopwords (dict) --
The stopword options configured for this search domain and the current status of those options.
Options (string) --
Lists stopwords serialized as a JSON document. The document has a single object with one property "stopwords" whose value is an array of strings. The maximum size of a stopwords document is 10 KB. Example: { "stopwords": ["a", "an", "the", "of"] }
Status (dict) --
The status of an option, including when it was last updated and whether it is actively in use for searches.
CreationDate (datetime) --
A timestamp for when this option was created.
UpdateDate (datetime) --
A timestamp for when this option was last updated.
UpdateVersion (integer) --
A unique integer that indicates when this option was last updated.
State (string) --
The state of processing a change to an option. Possible values:
RequiresIndexDocuments: the option's latest value will not be visible in searches until IndexDocuments has been called and indexing is complete.
Processing: the option's latest value is not yet visible in all searches but is in the process of being activated.
Active: the option's latest value is completely visible. Any warnings or messages generated during processing are provided in Diagnostics.
PendingDeletion (boolean) --
Indicates that the option will be deleted once processing is complete.