aws-sdk-cloudsearchdomain 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5d64100354ef0095ca71c00e1be1c5f3e2b7a82d
4
+ data.tar.gz: 436b05426425492f240eda641418026f67cd730c
5
+ SHA512:
6
+ metadata.gz: 9ae23568b6629842b17e3cbb4c314b227fc797980b834d73a5029332a033e5f569f78f4f8b4052592b61cb28e339a63eaa174e720168515ba30533974e1eb35d
7
+ data.tar.gz: cab2a055f0a9d0dc1b6527098ed46d718ed4839fc03d2c9b8daf60b9d57f061450514ed08f51b7510c416d62bb59f16889af57b143ffe43ba966edb41042b8c8
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-cloudsearchdomain/types'
12
+ require_relative 'aws-sdk-cloudsearchdomain/client_api'
13
+ require_relative 'aws-sdk-cloudsearchdomain/client'
14
+ require_relative 'aws-sdk-cloudsearchdomain/errors'
15
+ require_relative 'aws-sdk-cloudsearchdomain/resource'
16
+ require_relative 'aws-sdk-cloudsearchdomain/customizations'
17
+
18
+ # This module provides support for Amazon CloudSearch Domain. This module is available in the
19
+ # `aws-sdk-cloudsearchdomain` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from Amazon CloudSearch Domain all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::CloudSearchDomain::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::CloudSearchDomain
44
+
45
+ GEM_VERSION = '1.0.0.rc1'
46
+
47
+ end
@@ -0,0 +1,712 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/response_paging.rb'
18
+ require 'aws-sdk-core/plugins/stub_responses.rb'
19
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
20
+ require 'aws-sdk-core/plugins/signature_v4.rb'
21
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
22
+ require 'aws-sdk-cloudsearchdomain/plugins/conditional_signing.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:cloudsearchdomain)
25
+
26
+ module Aws
27
+ module CloudSearchDomain
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :cloudsearchdomain
33
+
34
+ set_api(ClientApi::API)
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)
51
+
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
118
+
119
+ # @!group API Operations
120
+
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
612
+
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
675
+
676
+ # @!endgroup
677
+
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
692
+
693
+ # @api private
694
+ # @deprecated
695
+ def waiter_names
696
+ []
697
+ end
698
+
699
+ class << self
700
+
701
+ # @api private
702
+ attr_reader :identifier
703
+
704
+ # @api private
705
+ def errors_module
706
+ Errors
707
+ end
708
+
709
+ end
710
+ end
711
+ end
712
+ end