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 +4 -4
- data/lib/aws-sdk-cloudsearchdomain.rb +2 -2
- data/lib/aws-sdk-cloudsearchdomain/client.rb +713 -669
- data/lib/aws-sdk-cloudsearchdomain/client_api.rb +218 -220
- data/lib/aws-sdk-cloudsearchdomain/errors.rb +4 -13
- data/lib/aws-sdk-cloudsearchdomain/plugins/switch_to_post.rb +38 -0
- data/lib/aws-sdk-cloudsearchdomain/resource.rb +12 -14
- data/lib/aws-sdk-cloudsearchdomain/types.rb +797 -764
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ada75527a105e1bb3aa655948eff2b2c25d7093f
|
4
|
+
data.tar.gz: 1e306d86b6cd9d7814354d6f9433815b7520c89c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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
|
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
|
-
|
28
|
-
class Client < Seahorse::Client::Base
|
27
|
+
module Aws::CloudSearchDomain
|
28
|
+
class Client < Seahorse::Client::Base
|
29
29
|
|
30
|
-
|
30
|
+
include Aws::ClientStubs
|
31
31
|
|
32
|
-
|
32
|
+
@identifier = :cloudsearchdomain
|
33
33
|
|
34
|
-
|
34
|
+
set_api(ClientApi::API)
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
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
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
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
|
-
|
133
|
+
# @!group API Operations
|
120
134
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
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 `<em>`. 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 `</em>`. 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: `<em>search-term</em>`.
|
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<String,Types::BucketInfo>
|
531
|
+
# * {Types::SearchResponse#stats #stats} => Hash<String,Types::FieldStats>
|
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
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
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
|
-
|
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<Types::DocumentServiceWarning>
|
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
|
-
|
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
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
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
|
-
|
738
|
+
# @api private
|
739
|
+
# @deprecated
|
740
|
+
def waiter_names
|
741
|
+
[]
|
742
|
+
end
|
700
743
|
|
701
|
-
|
702
|
-
attr_reader :identifier
|
744
|
+
class << self
|
703
745
|
|
704
|
-
|
705
|
-
|
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
|