Class: AWS::CloudSearch::Client

Inherits:
AWS::Core::QueryClient show all
Defined in:
lib/aws/cloud_search/client.rb

Overview

Client class for Amazon Cloud Search.

Instance Attribute Summary

Attributes inherited from AWS::Core::Client

#config, #http_read_timeout

Instance Method Summary collapse

Methods inherited from AWS::Core::Client

#initialize, #log_warning, #operations, operations, #with_http_handler, #with_options

Constructor Details

This class inherits a constructor from AWS::Core::Client

Instance Method Details

#create_domain(options = {}) ⇒ Core::Response

Calls the CreateDomain API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :domain_status - (Hash)

      • :domain_id - (String)

      • :domain_name - (String)

      • :created - (Boolean)

      • :deleted - (Boolean)

      • :num_searchable_docs - (Integer)

      • :doc_service - (Hash)

        • :arn - (String)

        • :endpoint - (String)

      • :search_service - (Hash)

        • :arn - (String)

        • :endpoint - (String)

      • :requires_index_documents - (Boolean)

      • :processing - (Boolean)

      • :search_instance_type - (String)

      • :search_partition_count - (Integer)

      • :search_instance_count - (Integer)



# File 'lib/aws/cloud_search/client.rb', line 25

#define_index_field(options = {}) ⇒ Core::Response

Calls the DefineIndexField API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

    • :index_field - required - (Hash)

      • :index_field_name - required - (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.

      • :index_field_type - required - (String) The type of field. Based on this type, exactly one of the UIntOptions, LiteralOptions or TextOptions must be present.

      • :u_int_options - (Hash) Options for an unsigned integer field. Present if IndexFieldType specifies the field is of type unsigned integer.

        • :default_value - (Integer) The default value for an unsigned integer field.

      • :literal_options - (Hash) Options for literal field. Present if IndexFieldType specifies the field is of type literal.

        • :default_value - (String) The default value for a literal field.

        • :search_enabled - (Boolean) Specifies whether search is enabled for this field.

        • :facet_enabled - (Boolean) Specifies whether facets are enabled for this field.

        • :result_enabled - (Boolean) Specifies whether values of this field can be returned in search results and used for ranking.

      • :text_options - (Hash) Options for text field. Present if IndexFieldType specifies the field is of type text.

        • :default_value - (String) The default value for a text field.

        • :facet_enabled - (Boolean) Specifies whether facets are enabled for this field.

        • :result_enabled - (Boolean) Specifies whether values of this field can be returned in search results and used for ranking.

      • :source_attributes - (Array<Hash>) 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.

        • :source_data_function - required - (String) Identifies the transformation to apply when copying data from a source attribute.

        • :source_data_copy - (Hash) Copies data from a source document attribute to an IndexField.

          • :source_name - required - (String) The name of the document source field to add to this IndexField.

          • :default_value - (String)

        • :source_data_trim_title - (Hash) 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.

          • :source_name - required - (String) The name of the document source field to add to this IndexField.

          • :default_value - (String)

          • :separator - (String) The separator that follows the text to trim.

          • :language - (String)

        • :source_data_map - (Hash) Maps source document attribute values to new values when populating the IndexField.

          • :source_name - required - (String) The name of the document source field to add to this IndexField.

          • :default_value - (String)

          • :cases - (Hash<String,String>) A map that translates source field values to custom values.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :index_field - (Hash)

      • :options - (Hash)

        • :index_field_name - (String)

        • :index_field_type - (String)

        • :u_int_options - (Hash)

          • :default_value - (Integer)

        • :literal_options - (Hash)

          • :default_value - (String)

          • :search_enabled - (Boolean)

          • :facet_enabled - (Boolean)

          • :result_enabled - (Boolean)

        • :text_options - (Hash)

          • :default_value - (String)

          • :facet_enabled - (Boolean)

          • :result_enabled - (Boolean)

        • :source_attributes - (Array<Hash>)

          • :source_data_function - (String)

          • :source_data_copy - (Hash)

            • :source_name - (String)

            • :default_value - (String)

          • :source_data_trim_title - (Hash)

            • :source_name - (String)

            • :default_value - (String)

            • :separator - (String)

            • :language - (String)

          • :source_data_map - (Hash)

            • :source_name - (String)

            • :default_value - (String)

            • :cases - (Hash<String,String>)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 50

#define_rank_expression(options = {}) ⇒ Core::Response

Calls the DefineRankExpression API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

    • :rank_expression - required - (Hash)

      • :rank_name - required - (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.

      • :rank_expression - required - (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),

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

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :rank_expression - (Hash)

      • :options - (Hash)

        • :rank_name - (String)

        • :rank_expression - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 156

#delete_domain(options = {}) ⇒ Core::Response

Calls the DeleteDomain API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :domain_status - (Hash)

      • :domain_id - (String)

      • :domain_name - (String)

      • :created - (Boolean)

      • :deleted - (Boolean)

      • :num_searchable_docs - (Integer)

      • :doc_service - (Hash)

        • :arn - (String)

        • :endpoint - (String)

      • :search_service - (Hash)

        • :arn - (String)

        • :endpoint - (String)

      • :requires_index_documents - (Boolean)

      • :processing - (Boolean)

      • :search_instance_type - (String)

      • :search_partition_count - (Integer)

      • :search_instance_count - (Integer)



# File 'lib/aws/cloud_search/client.rb', line 210

#delete_index_field(options = {}) ⇒ Core::Response

Calls the DeleteIndexField API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

    • :index_field_name - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :index_field - (Hash)

      • :options - (Hash)

        • :index_field_name - (String)

        • :index_field_type - (String)

        • :u_int_options - (Hash)

          • :default_value - (Integer)

        • :literal_options - (Hash)

          • :default_value - (String)

          • :search_enabled - (Boolean)

          • :facet_enabled - (Boolean)

          • :result_enabled - (Boolean)

        • :text_options - (Hash)

          • :default_value - (String)

          • :facet_enabled - (Boolean)

          • :result_enabled - (Boolean)

        • :source_attributes - (Array<Hash>)

          • :source_data_function - (String)

          • :source_data_copy - (Hash)

            • :source_name - (String)

            • :default_value - (String)

          • :source_data_trim_title - (Hash)

            • :source_name - (String)

            • :default_value - (String)

            • :separator - (String)

            • :language - (String)

          • :source_data_map - (Hash)

            • :source_name - (String)

            • :default_value - (String)

            • :cases - (Hash<String,String>)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 235

#delete_rank_expression(options = {}) ⇒ Core::Response

Calls the DeleteRankExpression API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

    • :rank_name - required - (String) The name of the RankExpression to delete.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :rank_expression - (Hash)

      • :options - (Hash)

        • :rank_name - (String)

        • :rank_expression - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 278

#describe_default_search_field(options = {}) ⇒ Core::Response

Calls the DescribeDefaultSearchField API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :default_search_field - (Hash)

      • :options - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 297

#describe_domains(options = {}) ⇒ Core::Response

Calls the DescribeDomains API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_names - (Array<String>) Limits the DescribeDomains response to the specified search domains.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :domain_status_list - (Array<Hash>)

      • :domain_id - (String)

      • :domain_name - (String)

      • :created - (Boolean)

      • :deleted - (Boolean)

      • :num_searchable_docs - (Integer)

      • :doc_service - (Hash)

        • :arn - (String)

        • :endpoint - (String)

      • :search_service - (Hash)

        • :arn - (String)

        • :endpoint - (String)

      • :requires_index_documents - (Boolean)

      • :processing - (Boolean)

      • :search_instance_type - (String)

      • :search_partition_count - (Integer)

      • :search_instance_count - (Integer)



# File 'lib/aws/cloud_search/client.rb', line 312

#describe_index_fields(options = {}) ⇒ Core::Response

Calls the DescribeIndexFields API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

    • :field_names - (Array<String>) Limits the DescribeIndexFields response to the specified fields.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :index_fields - (Array<Hash>)

      • :options - (Hash)

        • :index_field_name - (String)

        • :index_field_type - (String)

        • :u_int_options - (Hash)

          • :default_value - (Integer)

        • :literal_options - (Hash)

          • :default_value - (String)

          • :search_enabled - (Boolean)

          • :facet_enabled - (Boolean)

          • :result_enabled - (Boolean)

        • :text_options - (Hash)

          • :default_value - (String)

          • :facet_enabled - (Boolean)

          • :result_enabled - (Boolean)

        • :source_attributes - (Array<Hash>)

          • :source_data_function - (String)

          • :source_data_copy - (Hash)

            • :source_name - (String)

            • :default_value - (String)

          • :source_data_trim_title - (Hash)

            • :source_name - (String)

            • :default_value - (String)

            • :separator - (String)

            • :language - (String)

          • :source_data_map - (Hash)

            • :source_name - (String)

            • :default_value - (String)

            • :cases - (Hash<String,String>)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 338

#describe_rank_expressions(options = {}) ⇒ Core::Response

Calls the DescribeRankExpressions API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

    • :rank_names - (Array<String>) Limits the DescribeRankExpressions response to the specified fields.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :rank_expressions - (Array<Hash>)

      • :options - (Hash)

        • :rank_name - (String)

        • :rank_expression - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 382

#describe_service_access_policies(options = {}) ⇒ Core::Response

Calls the DescribeServiceAccessPolicies API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :access_policies - (Hash)

      • :options - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 401

#describe_stemming_options(options = {}) ⇒ Core::Response

Calls the DescribeStemmingOptions API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stems - (Hash)

      • :options - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 416

#describe_stopword_options(options = {}) ⇒ Core::Response

Calls the DescribeStopwordOptions API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stopwords - (Hash)

      • :options - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 431

#describe_synonym_options(options = {}) ⇒ Core::Response

Calls the DescribeSynonymOptions API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :synonyms - (Hash)

      • :options - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 446

#index_documents(options = {}) ⇒ Core::Response

Calls the IndexDocuments API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :field_names - (Array<String>)



# File 'lib/aws/cloud_search/client.rb', line 461

#update_default_search_field(options = {}) ⇒ Core::Response

Calls the UpdateDefaultSearchField API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

    • :default_search_field - required - (String) The IndexField to use for search requests issued with the q parameter. The default is an empty string, which automatically searches all text fields.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :default_search_field - (Hash)

      • :options - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 470

#update_service_access_policies(options = {}) ⇒ Core::Response

Calls the UpdateServiceAccessPolicies API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

    • :access_policies - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :access_policies - (Hash)

      • :options - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 488

#update_stemming_options(options = {}) ⇒ Core::Response

Calls the UpdateStemmingOptions API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

    • :stems - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stems - (Hash)

      • :options - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 504

#update_stopword_options(options = {}) ⇒ Core::Response

Calls the UpdateStopwordOptions API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

    • :stopwords - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stopwords - (Hash)

      • :options - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 520

#update_synonym_options(options = {}) ⇒ Core::Response

Calls the UpdateSynonymOptions API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :domain_name - required - (String)

    • :synonyms - required - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :synonyms - (Hash)

      • :options - (String)

      • :status - (Hash)

        • :creation_date - (Time)

        • :update_date - (Time)

        • :update_version - (Integer)

        • :state - (String)



# File 'lib/aws/cloud_search/client.rb', line 536