aws-sdk-cloudsearchdomain 1.0.0.rc1 → 1.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d64100354ef0095ca71c00e1be1c5f3e2b7a82d
4
- data.tar.gz: 436b05426425492f240eda641418026f67cd730c
3
+ metadata.gz: ada75527a105e1bb3aa655948eff2b2c25d7093f
4
+ data.tar.gz: 1e306d86b6cd9d7814354d6f9433815b7520c89c
5
5
  SHA512:
6
- metadata.gz: 9ae23568b6629842b17e3cbb4c314b227fc797980b834d73a5029332a033e5f569f78f4f8b4052592b61cb28e339a63eaa174e720168515ba30533974e1eb35d
7
- data.tar.gz: cab2a055f0a9d0dc1b6527098ed46d718ed4839fc03d2c9b8daf60b9d57f061450514ed08f51b7510c416d62bb59f16889af57b143ffe43ba966edb41042b8c8
6
+ metadata.gz: a4337d6df661debafa869275a3237dfbfb83820cca5fe83c26d84abba89eeb1c4d13d679d43309c40fe9ab2f74e43fce98ee204e5082f11fa0e8d15da96cb530
7
+ data.tar.gz: 663a9313f2ec7533c23577bd731582e9aafc7382824863f5494267bdaef9bbb3c9d1dbf8ad00a18ff361d8b3237fe5cccdeda733c5db902f031953804b5c3933
@@ -1,6 +1,6 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
@@ -42,6 +42,6 @@ require_relative 'aws-sdk-cloudsearchdomain/customizations'
42
42
  # @service
43
43
  module Aws::CloudSearchDomain
44
44
 
45
- GEM_VERSION = '1.0.0.rc1'
45
+ GEM_VERSION = '1.0.0.rc2'
46
46
 
47
47
  end
@@ -1,6 +1,6 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
@@ -20,693 +20,737 @@ require 'aws-sdk-core/plugins/idempotency_token.rb'
20
20
  require 'aws-sdk-core/plugins/signature_v4.rb'
21
21
  require 'aws-sdk-core/plugins/protocols/rest_json.rb'
22
22
  require 'aws-sdk-cloudsearchdomain/plugins/conditional_signing.rb'
23
+ require 'aws-sdk-cloudsearchdomain/plugins/switch_to_post.rb'
23
24
 
24
25
  Aws::Plugins::GlobalConfiguration.add_identifier(:cloudsearchdomain)
25
26
 
26
- module Aws
27
- module CloudSearchDomain
28
- class Client < Seahorse::Client::Base
27
+ module Aws::CloudSearchDomain
28
+ class Client < Seahorse::Client::Base
29
29
 
30
- include Aws::ClientStubs
30
+ include Aws::ClientStubs
31
31
 
32
- @identifier = :cloudsearchdomain
32
+ @identifier = :cloudsearchdomain
33
33
 
34
- set_api(ClientApi::API)
34
+ set_api(ClientApi::API)
35
35
 
36
- add_plugin(Seahorse::Client::Plugins::ContentLength)
37
- add_plugin(Aws::Plugins::CredentialsConfiguration)
38
- add_plugin(Aws::Plugins::Logging)
39
- add_plugin(Aws::Plugins::ParamConverter)
40
- add_plugin(Aws::Plugins::ParamValidator)
41
- add_plugin(Aws::Plugins::UserAgent)
42
- add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
- add_plugin(Aws::Plugins::RetryErrors)
44
- add_plugin(Aws::Plugins::GlobalConfiguration)
45
- add_plugin(Aws::Plugins::ResponsePaging)
46
- add_plugin(Aws::Plugins::StubResponses)
47
- add_plugin(Aws::Plugins::IdempotencyToken)
48
- add_plugin(Aws::Plugins::SignatureV4)
49
- add_plugin(Aws::Plugins::Protocols::RestJson)
50
- add_plugin(Aws::CloudSearchDomain::Plugins::ConditionalSigning)
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::ResponsePaging)
46
+ add_plugin(Aws::Plugins::StubResponses)
47
+ add_plugin(Aws::Plugins::IdempotencyToken)
48
+ add_plugin(Aws::Plugins::SignatureV4)
49
+ add_plugin(Aws::Plugins::Protocols::RestJson)
50
+ add_plugin(Aws::CloudSearchDomain::Plugins::ConditionalSigning)
51
+ add_plugin(Aws::CloudSearchDomain::Plugins::SwitchToPost)
51
52
 
52
- # @option options [required, Aws::CredentialProvider] :credentials
53
- # Your AWS credentials. This can be an instance of any one of the
54
- # following classes:
55
- #
56
- # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
- # credentials.
58
- #
59
- # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
- # from an EC2 IMDS on an EC2 instance.
61
- #
62
- # * `Aws::SharedCredentials` - Used for loading credentials from a
63
- # shared file, such as `~/.aws/config`.
64
- #
65
- # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
- #
67
- # When `:credentials` are not configured directly, the following
68
- # locations will be searched for credentials:
69
- #
70
- # * `Aws.config[:credentials]`
71
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
- # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
- # * `~/.aws/credentials`
74
- # * `~/.aws/config`
75
- # * EC2 IMDS instance profile - When used by default, the timeouts are
76
- # very aggressive. Construct and pass an instance of
77
- # `Aws::InstanceProfileCredentails` to enable retries and extended
78
- # timeouts.
79
- # @option options [String] :access_key_id
80
- # @option options [Boolean] :convert_params (true)
81
- # When `true`, an attempt is made to coerce request parameters into
82
- # the required types.
83
- # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
84
- # The log formatter.
85
- # @option options [Symbol] :log_level (:info)
86
- # The log level to send messages to the `:logger` at.
87
- # @option options [Logger] :logger
88
- # The Logger instance to send log messages to. If this option
89
- # is not set, logging will be disabled.
90
- # @option options [String] :profile ("default")
91
- # Used when loading credentials from the shared credentials file
92
- # at HOME/.aws/credentials. When not specified, 'default' is used.
93
- # @option options [Integer] :retry_limit (3)
94
- # The maximum number of times to retry failed requests. Only
95
- # ~ 500 level server errors and certain ~ 400 level client errors
96
- # are retried. Generally, these are throttling errors, data
97
- # checksum errors, networking errors, timeout errors and auth
98
- # errors from expired credentials.
99
- # @option options [String] :secret_access_key
100
- # @option options [String] :session_token
101
- # @option options [String] :sigv4_region
102
- # Only needed when sending authenticated/signed requests to a Cloud
103
- # Search domain and the endpoint does not contain the region name.
104
- # @option options [Boolean] :stub_responses (false)
105
- # Causes the client to return stubbed responses. By default
106
- # fake responses are generated and returned. You can specify
107
- # the response data to return or errors to raise by calling
108
- # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
109
- #
110
- # ** Please note ** When response stubbing is enabled, no HTTP
111
- # requests are made, and retries are disabled.
112
- # @option options [Boolean] :validate_params (true)
113
- # When `true`, request parameters are validated before
114
- # sending the request.
115
- def initialize(*args)
116
- super
117
- end
53
+ # @option options [required, Aws::CredentialProvider] :credentials
54
+ # Your AWS credentials. This can be an instance of any one of the
55
+ # following classes:
56
+ #
57
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
58
+ # credentials.
59
+ #
60
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
61
+ # from an EC2 IMDS on an EC2 instance.
62
+ #
63
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
64
+ # shared file, such as `~/.aws/config`.
65
+ #
66
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
67
+ #
68
+ # When `:credentials` are not configured directly, the following
69
+ # locations will be searched for credentials:
70
+ #
71
+ # * `Aws.config[:credentials]`
72
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
73
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
74
+ # * `~/.aws/credentials`
75
+ # * `~/.aws/config`
76
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
77
+ # very aggressive. Construct and pass an instance of
78
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
79
+ # timeouts.
80
+ #
81
+ # @option options [String] :access_key_id
82
+ #
83
+ # @option options [Boolean] :convert_params (true)
84
+ # When `true`, an attempt is made to coerce request parameters into
85
+ # the required types.
86
+ #
87
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
88
+ # The log formatter.
89
+ #
90
+ # @option options [Symbol] :log_level (:info)
91
+ # The log level to send messages to the `:logger` at.
92
+ #
93
+ # @option options [Logger] :logger
94
+ # The Logger instance to send log messages to. If this option
95
+ # is not set, logging will be disabled.
96
+ #
97
+ # @option options [String] :profile ("default")
98
+ # Used when loading credentials from the shared credentials file
99
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
100
+ #
101
+ # @option options [Integer] :retry_limit (3)
102
+ # The maximum number of times to retry failed requests. Only
103
+ # ~ 500 level server errors and certain ~ 400 level client errors
104
+ # are retried. Generally, these are throttling errors, data
105
+ # checksum errors, networking errors, timeout errors and auth
106
+ # errors from expired credentials.
107
+ #
108
+ # @option options [String] :secret_access_key
109
+ #
110
+ # @option options [String] :session_token
111
+ #
112
+ # @option options [String] :sigv4_region
113
+ # Only needed when sending authenticated/signed requests to a Cloud
114
+ # Search domain and the endpoint does not contain the region name.
115
+ #
116
+ # @option options [Boolean] :stub_responses (false)
117
+ # Causes the client to return stubbed responses. By default
118
+ # fake responses are generated and returned. You can specify
119
+ # the response data to return or errors to raise by calling
120
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
121
+ #
122
+ # ** Please note ** When response stubbing is enabled, no HTTP
123
+ # requests are made, and retries are disabled.
124
+ #
125
+ # @option options [Boolean] :validate_params (true)
126
+ # When `true`, request parameters are validated before
127
+ # sending the request.
128
+ #
129
+ def initialize(*args)
130
+ super
131
+ end
118
132
 
119
- # @!group API Operations
133
+ # @!group API Operations
120
134
 
121
- # Retrieves a list of documents that match the specified search
122
- # criteria. How you specify the search criteria depends on which query
123
- # parser you use. Amazon CloudSearch supports four query parsers:
124
- #
125
- # * `simple`\: search all `text` and `text-array` fields for the
126
- # specified string. Search for phrases, individual terms, and
127
- # prefixes.
128
- # * `structured`\: search specific fields, construct compound queries
129
- # using Boolean operators, and use advanced features such as term
130
- # boosting and proximity searching.
131
- # * `lucene`\: specify search criteria using the Apache Lucene query
132
- # parser syntax.
133
- # * `dismax`\: specify search criteria using the simplified subset of
134
- # the Apache Lucene query parser syntax defined by the DisMax query
135
- # parser.
136
- #
137
- # For more information, see [Searching Your Data][1] in the *Amazon
138
- # CloudSearch Developer Guide*.
139
- #
140
- # The endpoint for submitting `Search` requests is domain-specific. You
141
- # submit search requests to a domain's search endpoint. To get the
142
- # search endpoint for your domain, use the Amazon CloudSearch
143
- # configuration service `DescribeDomains` action. A domain's endpoints
144
- # are also displayed on the domain dashboard in the Amazon CloudSearch
145
- # console.
146
- #
147
- #
148
- #
149
- # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html
150
- # @option params [String] :cursor
151
- # Retrieves a cursor value you can use to page through large result
152
- # sets. Use the `size` parameter to control the number of hits to
153
- # include in each response. You can specify either the `cursor` or
154
- # `start` parameter in a request; they are mutually exclusive. To get
155
- # the first cursor, set the cursor value to `initial`. In subsequent
156
- # requests, specify the cursor value returned in the hits section of the
157
- # response.
158
- #
159
- # For more information, see [Paginating Results][1] in the *Amazon
160
- # CloudSearch Developer Guide*.
161
- #
162
- #
163
- #
164
- # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html
165
- # @option params [String] :expr
166
- # Defines one or more numeric expressions that can be used to sort
167
- # results or specify search or filter criteria. You can also specify
168
- # expressions as return fields.
169
- #
170
- # You specify the expressions in JSON using the form
171
- # `\{"EXPRESSIONNAME":"EXPRESSION"\}`. You can define and use multiple
172
- # expressions in a search request. For example:
173
- #
174
- # ` \{"expression1":"_score*rating", "expression2":"(1/rank)*year"\} `
175
- #
176
- # For information about the variables, operators, and functions you can
177
- # use in expressions, see [Writing Expressions][1] in the *Amazon
178
- # CloudSearch Developer Guide*.
179
- #
180
- #
181
- #
182
- # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html#writing-expressions
183
- # @option params [String] :facet
184
- # Specifies one or more fields for which to get facet information, and
185
- # options that control how the facet information is returned. Each
186
- # specified field must be facet-enabled in the domain configuration. The
187
- # fields and options are specified in JSON using the form
188
- # `\{"FIELD":\{"OPTION":VALUE,"OPTION:"STRING"\},"FIELD":\{"OPTION":VALUE,"OPTION":"STRING"\}\}`.
189
- #
190
- # You can specify the following faceting options:
191
- #
192
- # * `buckets` specifies an array of the facet values or ranges to count.
193
- # Ranges are specified using the same syntax that you use to search
194
- # for a range of values. For more information, see [ Searching for a
195
- # Range of Values][1] in the *Amazon CloudSearch Developer Guide*.
196
- # Buckets are returned in the order they are specified in the request.
197
- # The `sort` and `size` options are not valid if you specify
198
- # `buckets`.
199
- #
200
- # * `size` specifies the maximum number of facets to include in the
201
- # results. By default, Amazon CloudSearch returns counts for the top
202
- # 10. The `size` parameter is only valid when you specify the `sort`
203
- # option; it cannot be used in conjunction with `buckets`.
204
- #
205
- # * `sort` specifies how you want to sort the facets in the results:
206
- # `bucket` or `count`. Specify `bucket` to sort alphabetically or
207
- # numerically by facet value (in ascending order). Specify `count` to
208
- # sort by the facet counts computed for each facet value (in
209
- # descending order). To retrieve facet counts for particular values or
210
- # ranges of values, use the `buckets` option instead of `sort`.
211
- #
212
- # If no facet options are specified, facet counts are computed for all
213
- # field values, the facets are sorted by facet count, and the top 10
214
- # facets are returned in the results.
215
- #
216
- # To count particular buckets of values, use the `buckets` option. For
217
- # example, the following request uses the `buckets` option to calculate
218
- # and return facet counts by decade.
219
- #
220
- # `
221
- # \{"year":\{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,\}"]\}\}
222
- # `
223
- #
224
- # To sort facets by facet count, use the `count` option. For example,
225
- # the following request sets the `sort` option to `count` to sort the
226
- # facet values by facet count, with the facet values that have the most
227
- # matching documents listed first. Setting the `size` option to 3
228
- # returns only the top three facet values.
229
- #
230
- # ` \{"year":\{"sort":"count","size":3\}\} `
231
- #
232
- # To sort the facets by value, use the `bucket` option. For example, the
233
- # following request sets the `sort` option to `bucket` to sort the facet
234
- # values numerically by year, with earliest year listed first.
235
- #
236
- # ` \{"year":\{"sort":"bucket"\}\} `
237
- #
238
- # For more information, see [Getting and Using Facet Information][2] in
239
- # the *Amazon CloudSearch Developer Guide*.
240
- #
241
- #
242
- #
243
- # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-ranges.html
244
- # [2]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/faceting.html
245
- # @option params [String] :filter_query
246
- # Specifies a structured query that filters the results of a search
247
- # without affecting how the results are scored and sorted. You use
248
- # `filterQuery` in conjunction with the `query` parameter to filter the
249
- # documents that match the constraints specified in the `query`
250
- # parameter. Specifying a filter controls only which matching documents
251
- # are included in the results, it has no effect on how they are scored
252
- # and sorted. The `filterQuery` parameter supports the full structured
253
- # query syntax.
254
- #
255
- # For more information about using filters, see [Filtering Matching
256
- # Documents][1] in the *Amazon CloudSearch Developer Guide*.
257
- #
258
- #
259
- #
260
- # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/filtering-results.html
261
- # @option params [String] :highlight
262
- # Retrieves highlights for matches in the specified `text` or
263
- # `text-array` fields. Each specified field must be highlight enabled in
264
- # the domain configuration. The fields and options are specified in JSON
265
- # using the form
266
- # `\{"FIELD":\{"OPTION":VALUE,"OPTION:"STRING"\},"FIELD":\{"OPTION":VALUE,"OPTION":"STRING"\}\}`.
267
- #
268
- # You can specify the following highlight options:
269
- #
270
- # * `format`\: specifies the format of the data in the text field:
271
- # `text` or `html`. When data is returned as HTML, all
272
- # non-alphanumeric characters are encoded. The default is `html`.
273
- # * `max_phrases`\: specifies the maximum number of occurrences of the
274
- # search term(s) you want to highlight. By default, the first
275
- # occurrence is highlighted.
276
- # * `pre_tag`\: specifies the string to prepend to an occurrence of a
277
- # search term. The default for HTML highlights is `&lt;em&gt;`. The
278
- # default for text highlights is `*`.
279
- # * `post_tag`\: specifies the string to append to an occurrence of a
280
- # search term. The default for HTML highlights is `&lt;/em&gt;`. The
281
- # default for text highlights is `*`.
282
- #
283
- # If no highlight options are specified for a field, the returned field
284
- # text is treated as HTML and the first match is highlighted with
285
- # emphasis tags: `&lt;em>search-term&lt;/em&gt;`.
286
- #
287
- # For example, the following request retrieves highlights for the
288
- # `actors` and `title` fields.
289
- #
290
- # `\{ "actors": \{\}, "title": \{"format": "text","max_phrases":
291
- # 2,"pre_tag": "","post_tag": ""\} \}`
292
- # @option params [Boolean] :partial
293
- # Enables partial results to be returned if one or more index partitions
294
- # are unavailable. When your search index is partitioned across multiple
295
- # search instances, by default Amazon CloudSearch only returns results
296
- # if every partition can be queried. This means that the failure of a
297
- # single search instance can result in 5xx (internal server) errors.
298
- # When you enable partial results, Amazon CloudSearch returns whatever
299
- # results are available and includes the percentage of documents
300
- # searched in the search results (percent-searched). This enables you to
301
- # more gracefully degrade your users' search experience. For example,
302
- # rather than displaying no results, you could display the partial
303
- # results and a message indicating that the results might be incomplete
304
- # due to a temporary system outage.
305
- # @option params [required, String] :query
306
- # Specifies the search criteria for the request. How you specify the
307
- # search criteria depends on the query parser used for the request and
308
- # the parser options specified in the `queryOptions` parameter. By
309
- # default, the `simple` query parser is used to process requests. To use
310
- # the `structured`, `lucene`, or `dismax` query parser, you must also
311
- # specify the `queryParser` parameter.
312
- #
313
- # For more information about specifying search criteria, see [Searching
314
- # Your Data][1] in the *Amazon CloudSearch Developer Guide*.
315
- #
316
- #
317
- #
318
- # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html
319
- # @option params [String] :query_options
320
- # Configures options for the query parser specified in the `queryParser`
321
- # parameter. You specify the options in JSON using the following form
322
- # `\{"OPTION1":"VALUE1","OPTION2":VALUE2"..."OPTIONN":"VALUEN"\}.`
323
- #
324
- # The options you can configure vary according to which parser you use:
325
- #
326
- # * `defaultOperator`\: The default operator used to combine individual
327
- # terms in the search string. For example: `defaultOperator: 'or'`.
328
- # For the `dismax` parser, you specify a percentage that represents
329
- # the percentage of terms in the search string (rounded down) that
330
- # must match, rather than a default operator. A value of `0%` is the
331
- # equivalent to OR, and a value of `100%` is equivalent to AND. The
332
- # percentage must be specified as a value in the range 0-100 followed
333
- # by the percent (%) symbol. For example, `defaultOperator: 50%`.
334
- # Valid values: `and`, `or`, a percentage in the range 0%-100%
335
- # (`dismax`). Default: `and` (`simple`, `structured`, `lucene`) or
336
- # `100` (`dismax`). Valid for: `simple`, `structured`, `lucene`, and
337
- # `dismax`.
338
- # * `fields`\: An array of the fields to search when no fields are
339
- # specified in a search. If no fields are specified in a search and
340
- # this option is not specified, all text and text-array fields are
341
- # searched. You can specify a weight for each field to control the
342
- # relative importance of each field when Amazon CloudSearch calculates
343
- # relevance scores. To specify a field weight, append a caret (`^`)
344
- # symbol and the weight to the field name. For example, to boost the
345
- # importance of the `title` field over the `description` field you
346
- # could specify: `"fields":["title^5","description"]`. Valid values:
347
- # The name of any configured field and an optional numeric value
348
- # greater than zero. Default: All `text` and `text-array` fields.
349
- # Valid for: `simple`, `structured`, `lucene`, and `dismax`.
350
- # * `operators`\: An array of the operators or special characters you
351
- # want to disable for the simple query parser. If you disable the
352
- # `and`, `or`, or `not` operators, the corresponding operators (`+`,
353
- # `|`, `-`) have no special meaning and are dropped from the search
354
- # string. Similarly, disabling `prefix` disables the wildcard operator
355
- # (`*`) and disabling `phrase` disables the ability to search for
356
- # phrases by enclosing phrases in double quotes. Disabling precedence
357
- # disables the ability to control order of precedence using
358
- # parentheses. Disabling `near` disables the ability to use the ~
359
- # operator to perform a sloppy phrase search. Disabling the `fuzzy`
360
- # operator disables the ability to use the ~ operator to perform a
361
- # fuzzy search. `escape` disables the ability to use a backslash (``)
362
- # to escape special characters within the search string. Disabling
363
- # whitespace is an advanced option that prevents the parser from
364
- # tokenizing on whitespace, which can be useful for Vietnamese. (It
365
- # prevents Vietnamese words from being split incorrectly.) For
366
- # example, you could disable all operators other than the phrase
367
- # operator to support just simple term and phrase queries:
368
- # `"operators":["and","not","or", "prefix"]`. Valid values: `and`,
369
- # `escape`, `fuzzy`, `near`, `not`, `or`, `phrase`, `precedence`,
370
- # `prefix`, `whitespace`. Default: All operators and special
371
- # characters are enabled. Valid for: `simple`.
372
- # * `phraseFields`\: An array of the `text` or `text-array` fields you
373
- # want to use for phrase searches. When the terms in the search string
374
- # appear in close proximity within a field, the field scores higher.
375
- # You can specify a weight for each field to boost that score. The
376
- # `phraseSlop` option controls how much the matches can deviate from
377
- # the search string and still be boosted. To specify a field weight,
378
- # append a caret (`^`) symbol and the weight to the field name. For
379
- # example, to boost phrase matches in the `title` field over the
380
- # `abstract` field, you could specify: `"phraseFields":["title^3",
381
- # "plot"]` Valid values: The name of any `text` or `text-array` field
382
- # and an optional numeric value greater than zero. Default: No fields.
383
- # If you don't specify any fields with `phraseFields`, proximity
384
- # scoring is disabled even if `phraseSlop` is specified. Valid for:
385
- # `dismax`.
386
- # * `phraseSlop`\: An integer value that specifies how much matches can
387
- # deviate from the search phrase and still be boosted according to the
388
- # weights specified in the `phraseFields` option; for example,
389
- # `phraseSlop: 2`. You must also specify `phraseFields` to enable
390
- # proximity scoring. Valid values: positive integers. Default: 0.
391
- # Valid for: `dismax`.
392
- # * `explicitPhraseSlop`\: An integer value that specifies how much a
393
- # match can deviate from the search phrase when the phrase is enclosed
394
- # in double quotes in the search string. (Phrases that exceed this
395
- # proximity distance are not considered a match.) For example, to
396
- # specify a slop of three for dismax phrase queries, you would specify
397
- # `"explicitPhraseSlop":3`. Valid values: positive integers. Default:
398
- # 0. Valid for: `dismax`.
399
- # * `tieBreaker`\: When a term in the search string is found in a
400
- # document's field, a score is calculated for that field based on how
401
- # common the word is in that field compared to other documents. If the
402
- # term occurs in multiple fields within a document, by default only
403
- # the highest scoring field contributes to the document's overall
404
- # score. You can specify a `tieBreaker` value to enable the matches in
405
- # lower-scoring fields to contribute to the document's score. That
406
- # way, if two documents have the same max field score for a particular
407
- # term, the score for the document that has matches in more fields
408
- # will be higher. The formula for calculating the score with a
409
- # tieBreaker is `(max field score) + (tieBreaker) * (sum of the scores
410
- # for the rest of the matching fields)`. Set `tieBreaker` to 0 to
411
- # disregard all but the highest scoring field (pure max):
412
- # `"tieBreaker":0`. Set to 1 to sum the scores from all fields (pure
413
- # sum): `"tieBreaker":1`. Valid values: 0.0 to 1.0. Default: 0.0.
414
- # Valid for: `dismax`.
415
- # @option params [String] :query_parser
416
- # Specifies which query parser to use to process the request. If
417
- # `queryParser` is not specified, Amazon CloudSearch uses the `simple`
418
- # query parser.
419
- #
420
- # Amazon CloudSearch supports four query parsers:
421
- #
422
- # * `simple`\: perform simple searches of `text` and `text-array`
423
- # fields. By default, the `simple` query parser searches all `text`
424
- # and `text-array` fields. You can specify which fields to search by
425
- # with the `queryOptions` parameter. If you prefix a search term with
426
- # a plus sign (+) documents must contain the term to be considered a
427
- # match. (This is the default, unless you configure the default
428
- # operator with the `queryOptions` parameter.) You can use the `-`
429
- # (NOT), `|` (OR), and `*` (wildcard) operators to exclude particular
430
- # terms, find results that match any of the specified terms, or search
431
- # for a prefix. To search for a phrase rather than individual terms,
432
- # enclose the phrase in double quotes. For more information, see
433
- # [Searching for Text][1] in the *Amazon CloudSearch Developer Guide*.
434
- # * `structured`\: perform advanced searches by combining multiple
435
- # expressions to define the search criteria. You can also search
436
- # within particular fields, search for values and ranges of values,
437
- # and use advanced options such as term boosting, `matchall`, and
438
- # `near`. For more information, see [Constructing Compound Queries][2]
439
- # in the *Amazon CloudSearch Developer Guide*.
440
- # * `lucene`\: search using the Apache Lucene query parser syntax. For
441
- # more information, see [Apache Lucene Query Parser Syntax][3].
442
- # * `dismax`\: search using the simplified subset of the Apache Lucene
443
- # query parser syntax defined by the DisMax query parser. For more
444
- # information, see [DisMax Query Parser Syntax][4].
445
- #
446
- #
447
- #
448
- # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-text.html
449
- # [2]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-compound-queries.html
450
- # [3]: http://lucene.apache.org/core/4_6_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description
451
- # [4]: http://wiki.apache.org/solr/DisMaxQParserPlugin#Query_Syntax
452
- # @option params [String] :return
453
- # Specifies the field and expression values to include in the response.
454
- # Multiple fields or expressions are specified as a comma-separated
455
- # list. By default, a search response includes all return enabled fields
456
- # (`_all_fields`). To return only the document IDs for the matching
457
- # documents, specify `_no_fields`. To retrieve the relevance score
458
- # calculated for each document, specify `_score`.
459
- # @option params [Integer] :size
460
- # Specifies the maximum number of search hits to include in the
461
- # response.
462
- # @option params [String] :sort
463
- # Specifies the fields or custom expressions to use to sort the search
464
- # results. Multiple fields or expressions are specified as a
465
- # comma-separated list. You must specify the sort direction (`asc` or
466
- # `desc`) for each field; for example, `year desc,title asc`. To use a
467
- # field to sort results, the field must be sort-enabled in the domain
468
- # configuration. Array type fields cannot be used for sorting. If no
469
- # `sort` parameter is specified, results are sorted by their default
470
- # relevance scores in descending order: `_score desc`. You can also sort
471
- # by document ID (`_id asc`) and version (`_version desc`).
472
- #
473
- # For more information, see [Sorting Results][1] in the *Amazon
474
- # CloudSearch Developer Guide*.
475
- #
476
- #
477
- #
478
- # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/sorting-results.html
479
- # @option params [Integer] :start
480
- # Specifies the offset of the first search hit you want to return. Note
481
- # that the result set is zero-based; the first result is at index 0. You
482
- # can specify either the `start` or `cursor` parameter in a request,
483
- # they are mutually exclusive.
484
- #
485
- # For more information, see [Paginating Results][1] in the *Amazon
486
- # CloudSearch Developer Guide*.
487
- #
488
- #
489
- #
490
- # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html
491
- # @option params [String] :stats
492
- # Specifies one or more fields for which to get statistics information.
493
- # Each specified field must be facet-enabled in the domain
494
- # configuration. The fields are specified in JSON using the form:
495
- #
496
- # `\{"FIELD-A":\{\},"FIELD-B":\{\}\}` There are currently no options supported for statistics.
497
- # @return [Types::SearchResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
498
- #
499
- # * {Types::SearchResponse#status #status} => Types::SearchStatus
500
- # * {Types::SearchResponse#hits #hits} => Types::Hits
501
- # * {Types::SearchResponse#facets #facets} => Hash&lt;String,Types::BucketInfo&gt;
502
- # * {Types::SearchResponse#stats #stats} => Hash&lt;String,Types::FieldStats&gt;
503
- #
504
- # @example Request syntax with placeholder values
505
- # resp = client.search({
506
- # cursor: "Cursor",
507
- # expr: "Expr",
508
- # facet: "Facet",
509
- # filter_query: "FilterQuery",
510
- # highlight: "Highlight",
511
- # partial: false,
512
- # query: "Query", # required
513
- # query_options: "QueryOptions",
514
- # query_parser: "simple", # accepts simple, structured, lucene, dismax
515
- # return: "Return",
516
- # size: 1,
517
- # sort: "Sort",
518
- # start: 1,
519
- # stats: "Stat",
520
- # })
521
- #
522
- # @example Response structure
523
- # resp.status.timems #=> Integer
524
- # resp.status.rid #=> String
525
- # resp.hits.found #=> Integer
526
- # resp.hits.start #=> Integer
527
- # resp.hits.cursor #=> String
528
- # resp.hits.hit #=> Array
529
- # resp.hits.hit[0].id #=> String
530
- # resp.hits.hit[0].fields #=> Hash
531
- # resp.hits.hit[0].fields["String"] #=> Array
532
- # resp.hits.hit[0].fields["String"][0] #=> String
533
- # resp.hits.hit[0].exprs #=> Hash
534
- # resp.hits.hit[0].exprs["String"] #=> String
535
- # resp.hits.hit[0].highlights #=> Hash
536
- # resp.hits.hit[0].highlights["String"] #=> String
537
- # resp.facets #=> Hash
538
- # resp.facets["String"].buckets #=> Array
539
- # resp.facets["String"].buckets[0].value #=> String
540
- # resp.facets["String"].buckets[0].count #=> Integer
541
- # resp.stats #=> Hash
542
- # resp.stats["String"].min #=> String
543
- # resp.stats["String"].max #=> String
544
- # resp.stats["String"].count #=> Integer
545
- # resp.stats["String"].missing #=> Integer
546
- # resp.stats["String"].sum #=> Float
547
- # resp.stats["String"].sum_of_squares #=> Float
548
- # resp.stats["String"].mean #=> String
549
- # resp.stats["String"].stddev #=> Float
550
- # @overload search(params = {})
551
- # @param [Hash] params ({})
552
- def search(params = {}, options = {})
553
- req = build_request(:search, params)
554
- req.send_request(options)
555
- end
556
-
557
- # Retrieves autocomplete suggestions for a partial query string. You can
558
- # use suggestions enable you to display likely matches before users
559
- # finish typing. In Amazon CloudSearch, suggestions are based on the
560
- # contents of a particular text field. When you request suggestions,
561
- # Amazon CloudSearch finds all of the documents whose values in the
562
- # suggester field start with the specified query string. The beginning
563
- # of the field must match the query string to be considered a match.
564
- #
565
- # For more information about configuring suggesters and retrieving
566
- # suggestions, see [Getting Suggestions][1] in the *Amazon CloudSearch
567
- # Developer Guide*.
568
- #
569
- # The endpoint for submitting `Suggest` requests is domain-specific. You
570
- # submit suggest requests to a domain's search endpoint. To get the
571
- # search endpoint for your domain, use the Amazon CloudSearch
572
- # configuration service `DescribeDomains` action. A domain's endpoints
573
- # are also displayed on the domain dashboard in the Amazon CloudSearch
574
- # console.
575
- #
576
- #
577
- #
578
- # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html
579
- # @option params [required, String] :query
580
- # Specifies the string for which you want to get suggestions.
581
- # @option params [required, String] :suggester
582
- # Specifies the name of the suggester to use to find suggested matches.
583
- # @option params [Integer] :size
584
- # Specifies the maximum number of suggestions to return.
585
- # @return [Types::SuggestResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
586
- #
587
- # * {Types::SuggestResponse#status #status} => Types::SuggestStatus
588
- # * {Types::SuggestResponse#suggest #suggest} => Types::SuggestModel
589
- #
590
- # @example Request syntax with placeholder values
591
- # resp = client.suggest({
592
- # query: "Query", # required
593
- # suggester: "Suggester", # required
594
- # size: 1,
595
- # })
596
- #
597
- # @example Response structure
598
- # resp.status.timems #=> Integer
599
- # resp.status.rid #=> String
600
- # resp.suggest.query #=> String
601
- # resp.suggest.found #=> Integer
602
- # resp.suggest.suggestions #=> Array
603
- # resp.suggest.suggestions[0].suggestion #=> String
604
- # resp.suggest.suggestions[0].score #=> Integer
605
- # resp.suggest.suggestions[0].id #=> String
606
- # @overload suggest(params = {})
607
- # @param [Hash] params ({})
608
- def suggest(params = {}, options = {})
609
- req = build_request(:suggest, params)
610
- req.send_request(options)
611
- end
135
+ # Retrieves a list of documents that match the specified search
136
+ # criteria. How you specify the search criteria depends on which query
137
+ # parser you use. Amazon CloudSearch supports four query parsers:
138
+ #
139
+ # * `simple`\: search all `text` and `text-array` fields for the
140
+ # specified string. Search for phrases, individual terms, and
141
+ # prefixes.
142
+ # * `structured`\: search specific fields, construct compound queries
143
+ # using Boolean operators, and use advanced features such as term
144
+ # boosting and proximity searching.
145
+ # * `lucene`\: specify search criteria using the Apache Lucene query
146
+ # parser syntax.
147
+ # * `dismax`\: specify search criteria using the simplified subset of
148
+ # the Apache Lucene query parser syntax defined by the DisMax query
149
+ # parser.
150
+ #
151
+ # For more information, see [Searching Your Data][1] in the *Amazon
152
+ # CloudSearch Developer Guide*.
153
+ #
154
+ # The endpoint for submitting `Search` requests is domain-specific. You
155
+ # submit search requests to a domain's search endpoint. To get the
156
+ # search endpoint for your domain, use the Amazon CloudSearch
157
+ # configuration service `DescribeDomains` action. A domain's endpoints
158
+ # are also displayed on the domain dashboard in the Amazon CloudSearch
159
+ # console.
160
+ #
161
+ #
162
+ #
163
+ # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html
164
+ #
165
+ # @option params [String] :cursor
166
+ # Retrieves a cursor value you can use to page through large result
167
+ # sets. Use the `size` parameter to control the number of hits to
168
+ # include in each response. You can specify either the `cursor` or
169
+ # `start` parameter in a request; they are mutually exclusive. To get
170
+ # the first cursor, set the cursor value to `initial`. In subsequent
171
+ # requests, specify the cursor value returned in the hits section of the
172
+ # response.
173
+ #
174
+ # For more information, see [Paginating Results][1] in the *Amazon
175
+ # CloudSearch Developer Guide*.
176
+ #
177
+ #
178
+ #
179
+ # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html
180
+ #
181
+ # @option params [String] :expr
182
+ # Defines one or more numeric expressions that can be used to sort
183
+ # results or specify search or filter criteria. You can also specify
184
+ # expressions as return fields.
185
+ #
186
+ # You specify the expressions in JSON using the form
187
+ # `\{"EXPRESSIONNAME":"EXPRESSION"\}`. You can define and use multiple
188
+ # expressions in a search request. For example:
189
+ #
190
+ # ` \{"expression1":"_score*rating", "expression2":"(1/rank)*year"\} `
191
+ #
192
+ # For information about the variables, operators, and functions you can
193
+ # use in expressions, see [Writing Expressions][1] in the *Amazon
194
+ # CloudSearch Developer Guide*.
195
+ #
196
+ #
197
+ #
198
+ # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html#writing-expressions
199
+ #
200
+ # @option params [String] :facet
201
+ # Specifies one or more fields for which to get facet information, and
202
+ # options that control how the facet information is returned. Each
203
+ # specified field must be facet-enabled in the domain configuration. The
204
+ # fields and options are specified in JSON using the form
205
+ # `\{"FIELD":\{"OPTION":VALUE,"OPTION:"STRING"\},"FIELD":\{"OPTION":VALUE,"OPTION":"STRING"\}\}`.
206
+ #
207
+ # You can specify the following faceting options:
208
+ #
209
+ # * `buckets` specifies an array of the facet values or ranges to count.
210
+ # Ranges are specified using the same syntax that you use to search
211
+ # for a range of values. For more information, see [ Searching for a
212
+ # Range of Values][1] in the *Amazon CloudSearch Developer Guide*.
213
+ # Buckets are returned in the order they are specified in the request.
214
+ # The `sort` and `size` options are not valid if you specify
215
+ # `buckets`.
216
+ #
217
+ # * `size` specifies the maximum number of facets to include in the
218
+ # results. By default, Amazon CloudSearch returns counts for the top
219
+ # 10. The `size` parameter is only valid when you specify the `sort`
220
+ # option; it cannot be used in conjunction with `buckets`.
221
+ #
222
+ # * `sort` specifies how you want to sort the facets in the results:
223
+ # `bucket` or `count`. Specify `bucket` to sort alphabetically or
224
+ # numerically by facet value (in ascending order). Specify `count` to
225
+ # sort by the facet counts computed for each facet value (in
226
+ # descending order). To retrieve facet counts for particular values or
227
+ # ranges of values, use the `buckets` option instead of `sort`.
228
+ #
229
+ # If no facet options are specified, facet counts are computed for all
230
+ # field values, the facets are sorted by facet count, and the top 10
231
+ # facets are returned in the results.
232
+ #
233
+ # To count particular buckets of values, use the `buckets` option. For
234
+ # example, the following request uses the `buckets` option to calculate
235
+ # and return facet counts by decade.
236
+ #
237
+ # `
238
+ # \{"year":\{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,\}"]\}\}
239
+ # `
240
+ #
241
+ # To sort facets by facet count, use the `count` option. For example,
242
+ # the following request sets the `sort` option to `count` to sort the
243
+ # facet values by facet count, with the facet values that have the most
244
+ # matching documents listed first. Setting the `size` option to 3
245
+ # returns only the top three facet values.
246
+ #
247
+ # ` \{"year":\{"sort":"count","size":3\}\} `
248
+ #
249
+ # To sort the facets by value, use the `bucket` option. For example, the
250
+ # following request sets the `sort` option to `bucket` to sort the facet
251
+ # values numerically by year, with earliest year listed first.
252
+ #
253
+ # ` \{"year":\{"sort":"bucket"\}\} `
254
+ #
255
+ # For more information, see [Getting and Using Facet Information][2] in
256
+ # the *Amazon CloudSearch Developer Guide*.
257
+ #
258
+ #
259
+ #
260
+ # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-ranges.html
261
+ # [2]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/faceting.html
262
+ #
263
+ # @option params [String] :filter_query
264
+ # Specifies a structured query that filters the results of a search
265
+ # without affecting how the results are scored and sorted. You use
266
+ # `filterQuery` in conjunction with the `query` parameter to filter the
267
+ # documents that match the constraints specified in the `query`
268
+ # parameter. Specifying a filter controls only which matching documents
269
+ # are included in the results, it has no effect on how they are scored
270
+ # and sorted. The `filterQuery` parameter supports the full structured
271
+ # query syntax.
272
+ #
273
+ # For more information about using filters, see [Filtering Matching
274
+ # Documents][1] in the *Amazon CloudSearch Developer Guide*.
275
+ #
276
+ #
277
+ #
278
+ # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/filtering-results.html
279
+ #
280
+ # @option params [String] :highlight
281
+ # Retrieves highlights for matches in the specified `text` or
282
+ # `text-array` fields. Each specified field must be highlight enabled in
283
+ # the domain configuration. The fields and options are specified in JSON
284
+ # using the form
285
+ # `\{"FIELD":\{"OPTION":VALUE,"OPTION:"STRING"\},"FIELD":\{"OPTION":VALUE,"OPTION":"STRING"\}\}`.
286
+ #
287
+ # You can specify the following highlight options:
288
+ #
289
+ # * `format`\: specifies the format of the data in the text field:
290
+ # `text` or `html`. When data is returned as HTML, all
291
+ # non-alphanumeric characters are encoded. The default is `html`.
292
+ # * `max_phrases`\: specifies the maximum number of occurrences of the
293
+ # search term(s) you want to highlight. By default, the first
294
+ # occurrence is highlighted.
295
+ # * `pre_tag`\: specifies the string to prepend to an occurrence of a
296
+ # search term. The default for HTML highlights is `&lt;em&gt;`. The
297
+ # default for text highlights is `*`.
298
+ # * `post_tag`\: specifies the string to append to an occurrence of a
299
+ # search term. The default for HTML highlights is `&lt;/em&gt;`. The
300
+ # default for text highlights is `*`.
301
+ #
302
+ # If no highlight options are specified for a field, the returned field
303
+ # text is treated as HTML and the first match is highlighted with
304
+ # emphasis tags: `&lt;em>search-term&lt;/em&gt;`.
305
+ #
306
+ # For example, the following request retrieves highlights for the
307
+ # `actors` and `title` fields.
308
+ #
309
+ # `\{ "actors": \{\}, "title": \{"format": "text","max_phrases":
310
+ # 2,"pre_tag": "","post_tag": ""\} \}`
311
+ #
312
+ # @option params [Boolean] :partial
313
+ # Enables partial results to be returned if one or more index partitions
314
+ # are unavailable. When your search index is partitioned across multiple
315
+ # search instances, by default Amazon CloudSearch only returns results
316
+ # if every partition can be queried. This means that the failure of a
317
+ # single search instance can result in 5xx (internal server) errors.
318
+ # When you enable partial results, Amazon CloudSearch returns whatever
319
+ # results are available and includes the percentage of documents
320
+ # searched in the search results (percent-searched). This enables you to
321
+ # more gracefully degrade your users' search experience. For example,
322
+ # rather than displaying no results, you could display the partial
323
+ # results and a message indicating that the results might be incomplete
324
+ # due to a temporary system outage.
325
+ #
326
+ # @option params [required, String] :query
327
+ # Specifies the search criteria for the request. How you specify the
328
+ # search criteria depends on the query parser used for the request and
329
+ # the parser options specified in the `queryOptions` parameter. By
330
+ # default, the `simple` query parser is used to process requests. To use
331
+ # the `structured`, `lucene`, or `dismax` query parser, you must also
332
+ # specify the `queryParser` parameter.
333
+ #
334
+ # For more information about specifying search criteria, see [Searching
335
+ # Your Data][1] in the *Amazon CloudSearch Developer Guide*.
336
+ #
337
+ #
338
+ #
339
+ # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html
340
+ #
341
+ # @option params [String] :query_options
342
+ # Configures options for the query parser specified in the `queryParser`
343
+ # parameter. You specify the options in JSON using the following form
344
+ # `\{"OPTION1":"VALUE1","OPTION2":VALUE2"..."OPTIONN":"VALUEN"\}.`
345
+ #
346
+ # The options you can configure vary according to which parser you use:
347
+ #
348
+ # * `defaultOperator`\: The default operator used to combine individual
349
+ # terms in the search string. For example: `defaultOperator: 'or'`.
350
+ # For the `dismax` parser, you specify a percentage that represents
351
+ # the percentage of terms in the search string (rounded down) that
352
+ # must match, rather than a default operator. A value of `0%` is the
353
+ # equivalent to OR, and a value of `100%` is equivalent to AND. The
354
+ # percentage must be specified as a value in the range 0-100 followed
355
+ # by the percent (%) symbol. For example, `defaultOperator: 50%`.
356
+ # Valid values: `and`, `or`, a percentage in the range 0%-100%
357
+ # (`dismax`). Default: `and` (`simple`, `structured`, `lucene`) or
358
+ # `100` (`dismax`). Valid for: `simple`, `structured`, `lucene`, and
359
+ # `dismax`.
360
+ # * `fields`\: An array of the fields to search when no fields are
361
+ # specified in a search. If no fields are specified in a search and
362
+ # this option is not specified, all text and text-array fields are
363
+ # searched. You can specify a weight for each field to control the
364
+ # relative importance of each field when Amazon CloudSearch calculates
365
+ # relevance scores. To specify a field weight, append a caret (`^`)
366
+ # symbol and the weight to the field name. For example, to boost the
367
+ # importance of the `title` field over the `description` field you
368
+ # could specify: `"fields":["title^5","description"]`. Valid values:
369
+ # The name of any configured field and an optional numeric value
370
+ # greater than zero. Default: All `text` and `text-array` fields.
371
+ # Valid for: `simple`, `structured`, `lucene`, and `dismax`.
372
+ # * `operators`\: An array of the operators or special characters you
373
+ # want to disable for the simple query parser. If you disable the
374
+ # `and`, `or`, or `not` operators, the corresponding operators (`+`,
375
+ # `|`, `-`) have no special meaning and are dropped from the search
376
+ # string. Similarly, disabling `prefix` disables the wildcard operator
377
+ # (`*`) and disabling `phrase` disables the ability to search for
378
+ # phrases by enclosing phrases in double quotes. Disabling precedence
379
+ # disables the ability to control order of precedence using
380
+ # parentheses. Disabling `near` disables the ability to use the ~
381
+ # operator to perform a sloppy phrase search. Disabling the `fuzzy`
382
+ # operator disables the ability to use the ~ operator to perform a
383
+ # fuzzy search. `escape` disables the ability to use a backslash (``)
384
+ # to escape special characters within the search string. Disabling
385
+ # whitespace is an advanced option that prevents the parser from
386
+ # tokenizing on whitespace, which can be useful for Vietnamese. (It
387
+ # prevents Vietnamese words from being split incorrectly.) For
388
+ # example, you could disable all operators other than the phrase
389
+ # operator to support just simple term and phrase queries:
390
+ # `"operators":["and","not","or", "prefix"]`. Valid values: `and`,
391
+ # `escape`, `fuzzy`, `near`, `not`, `or`, `phrase`, `precedence`,
392
+ # `prefix`, `whitespace`. Default: All operators and special
393
+ # characters are enabled. Valid for: `simple`.
394
+ # * `phraseFields`\: An array of the `text` or `text-array` fields you
395
+ # want to use for phrase searches. When the terms in the search string
396
+ # appear in close proximity within a field, the field scores higher.
397
+ # You can specify a weight for each field to boost that score. The
398
+ # `phraseSlop` option controls how much the matches can deviate from
399
+ # the search string and still be boosted. To specify a field weight,
400
+ # append a caret (`^`) symbol and the weight to the field name. For
401
+ # example, to boost phrase matches in the `title` field over the
402
+ # `abstract` field, you could specify: `"phraseFields":["title^3",
403
+ # "plot"]` Valid values: The name of any `text` or `text-array` field
404
+ # and an optional numeric value greater than zero. Default: No fields.
405
+ # If you don't specify any fields with `phraseFields`, proximity
406
+ # scoring is disabled even if `phraseSlop` is specified. Valid for:
407
+ # `dismax`.
408
+ # * `phraseSlop`\: An integer value that specifies how much matches can
409
+ # deviate from the search phrase and still be boosted according to the
410
+ # weights specified in the `phraseFields` option; for example,
411
+ # `phraseSlop: 2`. You must also specify `phraseFields` to enable
412
+ # proximity scoring. Valid values: positive integers. Default: 0.
413
+ # Valid for: `dismax`.
414
+ # * `explicitPhraseSlop`\: An integer value that specifies how much a
415
+ # match can deviate from the search phrase when the phrase is enclosed
416
+ # in double quotes in the search string. (Phrases that exceed this
417
+ # proximity distance are not considered a match.) For example, to
418
+ # specify a slop of three for dismax phrase queries, you would specify
419
+ # `"explicitPhraseSlop":3`. Valid values: positive integers. Default:
420
+ # 0. Valid for: `dismax`.
421
+ # * `tieBreaker`\: When a term in the search string is found in a
422
+ # document's field, a score is calculated for that field based on how
423
+ # common the word is in that field compared to other documents. If the
424
+ # term occurs in multiple fields within a document, by default only
425
+ # the highest scoring field contributes to the document's overall
426
+ # score. You can specify a `tieBreaker` value to enable the matches in
427
+ # lower-scoring fields to contribute to the document's score. That
428
+ # way, if two documents have the same max field score for a particular
429
+ # term, the score for the document that has matches in more fields
430
+ # will be higher. The formula for calculating the score with a
431
+ # tieBreaker is `(max field score) + (tieBreaker) * (sum of the scores
432
+ # for the rest of the matching fields)`. Set `tieBreaker` to 0 to
433
+ # disregard all but the highest scoring field (pure max):
434
+ # `"tieBreaker":0`. Set to 1 to sum the scores from all fields (pure
435
+ # sum): `"tieBreaker":1`. Valid values: 0.0 to 1.0. Default: 0.0.
436
+ # Valid for: `dismax`.
437
+ #
438
+ # @option params [String] :query_parser
439
+ # Specifies which query parser to use to process the request. If
440
+ # `queryParser` is not specified, Amazon CloudSearch uses the `simple`
441
+ # query parser.
442
+ #
443
+ # Amazon CloudSearch supports four query parsers:
444
+ #
445
+ # * `simple`\: perform simple searches of `text` and `text-array`
446
+ # fields. By default, the `simple` query parser searches all `text`
447
+ # and `text-array` fields. You can specify which fields to search by
448
+ # with the `queryOptions` parameter. If you prefix a search term with
449
+ # a plus sign (+) documents must contain the term to be considered a
450
+ # match. (This is the default, unless you configure the default
451
+ # operator with the `queryOptions` parameter.) You can use the `-`
452
+ # (NOT), `|` (OR), and `*` (wildcard) operators to exclude particular
453
+ # terms, find results that match any of the specified terms, or search
454
+ # for a prefix. To search for a phrase rather than individual terms,
455
+ # enclose the phrase in double quotes. For more information, see
456
+ # [Searching for Text][1] in the *Amazon CloudSearch Developer Guide*.
457
+ # * `structured`\: perform advanced searches by combining multiple
458
+ # expressions to define the search criteria. You can also search
459
+ # within particular fields, search for values and ranges of values,
460
+ # and use advanced options such as term boosting, `matchall`, and
461
+ # `near`. For more information, see [Constructing Compound Queries][2]
462
+ # in the *Amazon CloudSearch Developer Guide*.
463
+ # * `lucene`\: search using the Apache Lucene query parser syntax. For
464
+ # more information, see [Apache Lucene Query Parser Syntax][3].
465
+ # * `dismax`\: search using the simplified subset of the Apache Lucene
466
+ # query parser syntax defined by the DisMax query parser. For more
467
+ # information, see [DisMax Query Parser Syntax][4].
468
+ #
469
+ #
470
+ #
471
+ # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-text.html
472
+ # [2]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-compound-queries.html
473
+ # [3]: http://lucene.apache.org/core/4_6_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description
474
+ # [4]: http://wiki.apache.org/solr/DisMaxQParserPlugin#Query_Syntax
475
+ #
476
+ # @option params [String] :return
477
+ # Specifies the field and expression values to include in the response.
478
+ # Multiple fields or expressions are specified as a comma-separated
479
+ # list. By default, a search response includes all return enabled fields
480
+ # (`_all_fields`). To return only the document IDs for the matching
481
+ # documents, specify `_no_fields`. To retrieve the relevance score
482
+ # calculated for each document, specify `_score`.
483
+ #
484
+ # @option params [Integer] :size
485
+ # Specifies the maximum number of search hits to include in the
486
+ # response.
487
+ #
488
+ # @option params [String] :sort
489
+ # Specifies the fields or custom expressions to use to sort the search
490
+ # results. Multiple fields or expressions are specified as a
491
+ # comma-separated list. You must specify the sort direction (`asc` or
492
+ # `desc`) for each field; for example, `year desc,title asc`. To use a
493
+ # field to sort results, the field must be sort-enabled in the domain
494
+ # configuration. Array type fields cannot be used for sorting. If no
495
+ # `sort` parameter is specified, results are sorted by their default
496
+ # relevance scores in descending order: `_score desc`. You can also sort
497
+ # by document ID (`_id asc`) and version (`_version desc`).
498
+ #
499
+ # For more information, see [Sorting Results][1] in the *Amazon
500
+ # CloudSearch Developer Guide*.
501
+ #
502
+ #
503
+ #
504
+ # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/sorting-results.html
505
+ #
506
+ # @option params [Integer] :start
507
+ # Specifies the offset of the first search hit you want to return. Note
508
+ # that the result set is zero-based; the first result is at index 0. You
509
+ # can specify either the `start` or `cursor` parameter in a request,
510
+ # they are mutually exclusive.
511
+ #
512
+ # For more information, see [Paginating Results][1] in the *Amazon
513
+ # CloudSearch Developer Guide*.
514
+ #
515
+ #
516
+ #
517
+ # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html
518
+ #
519
+ # @option params [String] :stats
520
+ # Specifies one or more fields for which to get statistics information.
521
+ # Each specified field must be facet-enabled in the domain
522
+ # configuration. The fields are specified in JSON using the form:
523
+ #
524
+ # `\{"FIELD-A":\{\},"FIELD-B":\{\}\}` There are currently no options supported for statistics.
525
+ #
526
+ # @return [Types::SearchResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
527
+ #
528
+ # * {Types::SearchResponse#status #status} => Types::SearchStatus
529
+ # * {Types::SearchResponse#hits #hits} => Types::Hits
530
+ # * {Types::SearchResponse#facets #facets} => Hash&lt;String,Types::BucketInfo&gt;
531
+ # * {Types::SearchResponse#stats #stats} => Hash&lt;String,Types::FieldStats&gt;
532
+ #
533
+ # @example Request syntax with placeholder values
534
+ #
535
+ # resp = client.search({
536
+ # cursor: "Cursor",
537
+ # expr: "Expr",
538
+ # facet: "Facet",
539
+ # filter_query: "FilterQuery",
540
+ # highlight: "Highlight",
541
+ # partial: false,
542
+ # query: "Query", # required
543
+ # query_options: "QueryOptions",
544
+ # query_parser: "simple", # accepts simple, structured, lucene, dismax
545
+ # return: "Return",
546
+ # size: 1,
547
+ # sort: "Sort",
548
+ # start: 1,
549
+ # stats: "Stat",
550
+ # })
551
+ #
552
+ # @example Response structure
553
+ #
554
+ # resp.status.timems #=> Integer
555
+ # resp.status.rid #=> String
556
+ # resp.hits.found #=> Integer
557
+ # resp.hits.start #=> Integer
558
+ # resp.hits.cursor #=> String
559
+ # resp.hits.hit #=> Array
560
+ # resp.hits.hit[0].id #=> String
561
+ # resp.hits.hit[0].fields #=> Hash
562
+ # resp.hits.hit[0].fields["String"] #=> Array
563
+ # resp.hits.hit[0].fields["String"][0] #=> String
564
+ # resp.hits.hit[0].exprs #=> Hash
565
+ # resp.hits.hit[0].exprs["String"] #=> String
566
+ # resp.hits.hit[0].highlights #=> Hash
567
+ # resp.hits.hit[0].highlights["String"] #=> String
568
+ # resp.facets #=> Hash
569
+ # resp.facets["String"].buckets #=> Array
570
+ # resp.facets["String"].buckets[0].value #=> String
571
+ # resp.facets["String"].buckets[0].count #=> Integer
572
+ # resp.stats #=> Hash
573
+ # resp.stats["String"].min #=> String
574
+ # resp.stats["String"].max #=> String
575
+ # resp.stats["String"].count #=> Integer
576
+ # resp.stats["String"].missing #=> Integer
577
+ # resp.stats["String"].sum #=> Float
578
+ # resp.stats["String"].sum_of_squares #=> Float
579
+ # resp.stats["String"].mean #=> String
580
+ # resp.stats["String"].stddev #=> Float
581
+ #
582
+ # @overload search(params = {})
583
+ # @param [Hash] params ({})
584
+ def search(params = {}, options = {})
585
+ req = build_request(:search, params)
586
+ req.send_request(options)
587
+ end
612
588
 
613
- # Posts a batch of documents to a search domain for indexing. A document
614
- # batch is a collection of add and delete operations that represent the
615
- # documents you want to add, update, or delete from your domain. Batches
616
- # can be described in either JSON or XML. Each item that you want Amazon
617
- # CloudSearch to return as a search result (such as a product) is
618
- # represented as a document. Every document has a unique ID and one or
619
- # more fields that contain the data that you want to search and return
620
- # in results. Individual documents cannot contain more than 1 MB of
621
- # data. The entire batch cannot exceed 5 MB. To get the best possible
622
- # upload performance, group add and delete operations in batches that
623
- # are close the 5 MB limit. Submitting a large volume of single-document
624
- # batches can overload a domain's document service.
625
- #
626
- # The endpoint for submitting `UploadDocuments` requests is
627
- # domain-specific. To get the document endpoint for your domain, use the
628
- # Amazon CloudSearch configuration service `DescribeDomains` action. A
629
- # domain's endpoints are also displayed on the domain dashboard in the
630
- # Amazon CloudSearch console.
631
- #
632
- # For more information about formatting your data for Amazon
633
- # CloudSearch, see [Preparing Your Data][1] in the *Amazon CloudSearch
634
- # Developer Guide*. For more information about uploading data for
635
- # indexing, see [Uploading Data][2] in the *Amazon CloudSearch Developer
636
- # Guide*.
637
- #
638
- #
639
- #
640
- # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/preparing-data.html
641
- # [2]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html
642
- # @option params [required, String, IO] :documents
643
- # A batch of documents formatted in JSON or HTML.
644
- # @option params [required, String] :content_type
645
- # The format of the batch you are uploading. Amazon CloudSearch supports
646
- # two document batch formats:
647
- #
648
- # * application/json
649
- # * application/xml
650
- # @return [Types::UploadDocumentsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
651
- #
652
- # * {Types::UploadDocumentsResponse#status #status} => String
653
- # * {Types::UploadDocumentsResponse#adds #adds} => Integer
654
- # * {Types::UploadDocumentsResponse#deletes #deletes} => Integer
655
- # * {Types::UploadDocumentsResponse#warnings #warnings} => Array&lt;Types::DocumentServiceWarning&gt;
656
- #
657
- # @example Request syntax with placeholder values
658
- # resp = client.upload_documents({
659
- # documents: "data", # required
660
- # content_type: "application/json", # required, accepts application/json, application/xml
661
- # })
662
- #
663
- # @example Response structure
664
- # resp.status #=> String
665
- # resp.adds #=> Integer
666
- # resp.deletes #=> Integer
667
- # resp.warnings #=> Array
668
- # resp.warnings[0].message #=> String
669
- # @overload upload_documents(params = {})
670
- # @param [Hash] params ({})
671
- def upload_documents(params = {}, options = {})
672
- req = build_request(:upload_documents, params)
673
- req.send_request(options)
674
- end
589
+ # Retrieves autocomplete suggestions for a partial query string. You can
590
+ # use suggestions enable you to display likely matches before users
591
+ # finish typing. In Amazon CloudSearch, suggestions are based on the
592
+ # contents of a particular text field. When you request suggestions,
593
+ # Amazon CloudSearch finds all of the documents whose values in the
594
+ # suggester field start with the specified query string. The beginning
595
+ # of the field must match the query string to be considered a match.
596
+ #
597
+ # For more information about configuring suggesters and retrieving
598
+ # suggestions, see [Getting Suggestions][1] in the *Amazon CloudSearch
599
+ # Developer Guide*.
600
+ #
601
+ # The endpoint for submitting `Suggest` requests is domain-specific. You
602
+ # submit suggest requests to a domain's search endpoint. To get the
603
+ # search endpoint for your domain, use the Amazon CloudSearch
604
+ # configuration service `DescribeDomains` action. A domain's endpoints
605
+ # are also displayed on the domain dashboard in the Amazon CloudSearch
606
+ # console.
607
+ #
608
+ #
609
+ #
610
+ # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html
611
+ #
612
+ # @option params [required, String] :query
613
+ # Specifies the string for which you want to get suggestions.
614
+ #
615
+ # @option params [required, String] :suggester
616
+ # Specifies the name of the suggester to use to find suggested matches.
617
+ #
618
+ # @option params [Integer] :size
619
+ # Specifies the maximum number of suggestions to return.
620
+ #
621
+ # @return [Types::SuggestResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
622
+ #
623
+ # * {Types::SuggestResponse#status #status} => Types::SuggestStatus
624
+ # * {Types::SuggestResponse#suggest #suggest} => Types::SuggestModel
625
+ #
626
+ # @example Request syntax with placeholder values
627
+ #
628
+ # resp = client.suggest({
629
+ # query: "Query", # required
630
+ # suggester: "Suggester", # required
631
+ # size: 1,
632
+ # })
633
+ #
634
+ # @example Response structure
635
+ #
636
+ # resp.status.timems #=> Integer
637
+ # resp.status.rid #=> String
638
+ # resp.suggest.query #=> String
639
+ # resp.suggest.found #=> Integer
640
+ # resp.suggest.suggestions #=> Array
641
+ # resp.suggest.suggestions[0].suggestion #=> String
642
+ # resp.suggest.suggestions[0].score #=> Integer
643
+ # resp.suggest.suggestions[0].id #=> String
644
+ #
645
+ # @overload suggest(params = {})
646
+ # @param [Hash] params ({})
647
+ def suggest(params = {}, options = {})
648
+ req = build_request(:suggest, params)
649
+ req.send_request(options)
650
+ end
675
651
 
676
- # @!endgroup
652
+ # Posts a batch of documents to a search domain for indexing. A document
653
+ # batch is a collection of add and delete operations that represent the
654
+ # documents you want to add, update, or delete from your domain. Batches
655
+ # can be described in either JSON or XML. Each item that you want Amazon
656
+ # CloudSearch to return as a search result (such as a product) is
657
+ # represented as a document. Every document has a unique ID and one or
658
+ # more fields that contain the data that you want to search and return
659
+ # in results. Individual documents cannot contain more than 1 MB of
660
+ # data. The entire batch cannot exceed 5 MB. To get the best possible
661
+ # upload performance, group add and delete operations in batches that
662
+ # are close the 5 MB limit. Submitting a large volume of single-document
663
+ # batches can overload a domain's document service.
664
+ #
665
+ # The endpoint for submitting `UploadDocuments` requests is
666
+ # domain-specific. To get the document endpoint for your domain, use the
667
+ # Amazon CloudSearch configuration service `DescribeDomains` action. A
668
+ # domain's endpoints are also displayed on the domain dashboard in the
669
+ # Amazon CloudSearch console.
670
+ #
671
+ # For more information about formatting your data for Amazon
672
+ # CloudSearch, see [Preparing Your Data][1] in the *Amazon CloudSearch
673
+ # Developer Guide*. For more information about uploading data for
674
+ # indexing, see [Uploading Data][2] in the *Amazon CloudSearch Developer
675
+ # Guide*.
676
+ #
677
+ #
678
+ #
679
+ # [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/preparing-data.html
680
+ # [2]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html
681
+ #
682
+ # @option params [required, String, IO] :documents
683
+ # A batch of documents formatted in JSON or HTML.
684
+ #
685
+ # @option params [required, String] :content_type
686
+ # The format of the batch you are uploading. Amazon CloudSearch supports
687
+ # two document batch formats:
688
+ #
689
+ # * application/json
690
+ # * application/xml
691
+ #
692
+ # @return [Types::UploadDocumentsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
693
+ #
694
+ # * {Types::UploadDocumentsResponse#status #status} => String
695
+ # * {Types::UploadDocumentsResponse#adds #adds} => Integer
696
+ # * {Types::UploadDocumentsResponse#deletes #deletes} => Integer
697
+ # * {Types::UploadDocumentsResponse#warnings #warnings} => Array&lt;Types::DocumentServiceWarning&gt;
698
+ #
699
+ # @example Request syntax with placeholder values
700
+ #
701
+ # resp = client.upload_documents({
702
+ # documents: "data", # required
703
+ # content_type: "application/json", # required, accepts application/json, application/xml
704
+ # })
705
+ #
706
+ # @example Response structure
707
+ #
708
+ # resp.status #=> String
709
+ # resp.adds #=> Integer
710
+ # resp.deletes #=> Integer
711
+ # resp.warnings #=> Array
712
+ # resp.warnings[0].message #=> String
713
+ #
714
+ # @overload upload_documents(params = {})
715
+ # @param [Hash] params ({})
716
+ def upload_documents(params = {}, options = {})
717
+ req = build_request(:upload_documents, params)
718
+ req.send_request(options)
719
+ end
677
720
 
678
- # @param params ({})
679
- # @api private
680
- def build_request(operation_name, params = {})
681
- handlers = @handlers.for(operation_name)
682
- context = Seahorse::Client::RequestContext.new(
683
- operation_name: operation_name,
684
- operation: config.api.operation(operation_name),
685
- client: self,
686
- params: params,
687
- config: config)
688
- context[:gem_name] = 'aws-sdk-cloudsearchdomain'
689
- context[:gem_version] = '1.0.0.rc1'
690
- Seahorse::Client::Request.new(handlers, context)
691
- end
721
+ # @!endgroup
692
722
 
693
- # @api private
694
- # @deprecated
695
- def waiter_names
696
- []
697
- end
723
+ # @param params ({})
724
+ # @api private
725
+ def build_request(operation_name, params = {})
726
+ handlers = @handlers.for(operation_name)
727
+ context = Seahorse::Client::RequestContext.new(
728
+ operation_name: operation_name,
729
+ operation: config.api.operation(operation_name),
730
+ client: self,
731
+ params: params,
732
+ config: config)
733
+ context[:gem_name] = 'aws-sdk-cloudsearchdomain'
734
+ context[:gem_version] = '1.0.0.rc2'
735
+ Seahorse::Client::Request.new(handlers, context)
736
+ end
698
737
 
699
- class << self
738
+ # @api private
739
+ # @deprecated
740
+ def waiter_names
741
+ []
742
+ end
700
743
 
701
- # @api private
702
- attr_reader :identifier
744
+ class << self
703
745
 
704
- # @api private
705
- def errors_module
706
- Errors
707
- end
746
+ # @api private
747
+ attr_reader :identifier
708
748
 
749
+ # @api private
750
+ def errors_module
751
+ Errors
709
752
  end
753
+
710
754
  end
711
755
  end
712
756
  end