aws-sdk-cloudsearchdomain 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,38 @@
|
|
1
|
+
module Aws
|
2
|
+
module CloudSearchDomain
|
3
|
+
module Plugins
|
4
|
+
|
5
|
+
# CloudSearchDomain has query length limits for #search in GET
|
6
|
+
# Convert #search operation request from GET to POST
|
7
|
+
class SwitchToPost < Seahorse::Client::Plugin
|
8
|
+
|
9
|
+
# @api private
|
10
|
+
class Handler < Seahorse::Client::Handler
|
11
|
+
|
12
|
+
def call(context)
|
13
|
+
convert_get_2_post(context)
|
14
|
+
@handler.call(context)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def convert_get_2_post(context)
|
20
|
+
context.http_request.http_method = 'POST'
|
21
|
+
uri = context.http_request.endpoint
|
22
|
+
context.http_request.body = uri.query
|
23
|
+
context.http_request.headers['Content-Length'] = uri.query.length
|
24
|
+
context.http_request.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
25
|
+
context.http_request.endpoint.query = nil
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
handler(
|
31
|
+
Handler,
|
32
|
+
step: :build,
|
33
|
+
operations: [:search]
|
34
|
+
)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -1,25 +1,23 @@
|
|
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
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
class Resource
|
8
|
+
module Aws::CloudSearchDomain
|
9
|
+
class Resource
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
# @return [Client]
|
19
|
-
def client
|
20
|
-
@client
|
21
|
-
end
|
11
|
+
# @param options ({})
|
12
|
+
# @option options [Client] :client
|
13
|
+
def initialize(options = {})
|
14
|
+
@client = options[:client] || Client.new(options)
|
15
|
+
end
|
22
16
|
|
17
|
+
# @return [Client]
|
18
|
+
def client
|
19
|
+
@client
|
23
20
|
end
|
21
|
+
|
24
22
|
end
|
25
23
|
end
|
@@ -1,789 +1,822 @@
|
|
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
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
module
|
10
|
-
module Types
|
8
|
+
module Aws::CloudSearchDomain
|
9
|
+
module Types
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
# @!attribute [rw] buckets
|
29
|
-
# A list of the calculated facet values and counts.
|
30
|
-
# @return [Array<Types::Bucket>]
|
31
|
-
class BucketInfo < Struct.new(
|
32
|
-
:buckets)
|
33
|
-
include Aws::Structure
|
34
|
-
end
|
11
|
+
# A container for facet information.
|
12
|
+
#
|
13
|
+
# @!attribute [rw] value
|
14
|
+
# The facet value being counted.
|
15
|
+
# @return [String]
|
16
|
+
#
|
17
|
+
# @!attribute [rw] count
|
18
|
+
# The number of hits that contain the facet value in the specified
|
19
|
+
# facet field.
|
20
|
+
# @return [Integer]
|
21
|
+
#
|
22
|
+
class Bucket < Struct.new(
|
23
|
+
:value,
|
24
|
+
:count)
|
25
|
+
include Aws::Structure
|
26
|
+
end
|
35
27
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
28
|
+
# A container for the calculated facet values and counts.
|
29
|
+
#
|
30
|
+
# @!attribute [rw] buckets
|
31
|
+
# A list of the calculated facet values and counts.
|
32
|
+
# @return [Array<Types::Bucket>]
|
33
|
+
#
|
34
|
+
class BucketInfo < Struct.new(
|
35
|
+
:buckets)
|
36
|
+
include Aws::Structure
|
37
|
+
end
|
45
38
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
#
|
58
|
-
#
|
59
|
-
# [1]: http://tools.ietf.org/html/rfc3339
|
60
|
-
# @return [String]
|
61
|
-
#
|
62
|
-
# @!attribute [rw] max
|
63
|
-
# The maximum value found in the specified field in the result set.
|
64
|
-
#
|
65
|
-
# If the field is numeric (`int`, `int-array`, `double`, or
|
66
|
-
# `double-array`), `max` is the string representation of a
|
67
|
-
# double-precision 64-bit floating point value. If the field is `date`
|
68
|
-
# or `date-array`, `max` is the string representation of a date with
|
69
|
-
# the format specified in [IETF RFC3339][1]\:
|
70
|
-
# yyyy-mm-ddTHH:mm:ss.SSSZ.
|
71
|
-
#
|
72
|
-
#
|
73
|
-
#
|
74
|
-
# [1]: http://tools.ietf.org/html/rfc3339
|
75
|
-
# @return [String]
|
76
|
-
#
|
77
|
-
# @!attribute [rw] count
|
78
|
-
# The number of documents that contain a value in the specified field
|
79
|
-
# in the result set.
|
80
|
-
# @return [Integer]
|
81
|
-
#
|
82
|
-
# @!attribute [rw] missing
|
83
|
-
# The number of documents that do not contain a value in the specified
|
84
|
-
# field in the result set.
|
85
|
-
# @return [Integer]
|
86
|
-
#
|
87
|
-
# @!attribute [rw] sum
|
88
|
-
# The sum of the field values across the documents in the result set.
|
89
|
-
# `null` for date fields.
|
90
|
-
# @return [Float]
|
91
|
-
#
|
92
|
-
# @!attribute [rw] sum_of_squares
|
93
|
-
# The sum of all field values in the result set squared.
|
94
|
-
# @return [Float]
|
95
|
-
#
|
96
|
-
# @!attribute [rw] mean
|
97
|
-
# The average of the values found in the specified field in the result
|
98
|
-
# set.
|
99
|
-
#
|
100
|
-
# If the field is numeric (`int`, `int-array`, `double`, or
|
101
|
-
# `double-array`), `mean` is the string representation of a
|
102
|
-
# double-precision 64-bit floating point value. If the field is `date`
|
103
|
-
# or `date-array`, `mean` is the string representation of a date with
|
104
|
-
# the format specified in [IETF RFC3339][1]\:
|
105
|
-
# yyyy-mm-ddTHH:mm:ss.SSSZ.
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# [1]: http://tools.ietf.org/html/rfc3339
|
110
|
-
# @return [String]
|
111
|
-
#
|
112
|
-
# @!attribute [rw] stddev
|
113
|
-
# The standard deviation of the values in the specified field in the
|
114
|
-
# result set.
|
115
|
-
# @return [Float]
|
116
|
-
class FieldStats < Struct.new(
|
117
|
-
:min,
|
118
|
-
:max,
|
119
|
-
:count,
|
120
|
-
:missing,
|
121
|
-
:sum,
|
122
|
-
:sum_of_squares,
|
123
|
-
:mean,
|
124
|
-
:stddev)
|
125
|
-
include Aws::Structure
|
126
|
-
end
|
39
|
+
# A warning returned by the document service when an issue is discovered
|
40
|
+
# while processing an upload request.
|
41
|
+
#
|
42
|
+
# @!attribute [rw] message
|
43
|
+
# The description for a warning returned by the document service.
|
44
|
+
# @return [String]
|
45
|
+
#
|
46
|
+
class DocumentServiceWarning < Struct.new(
|
47
|
+
:message)
|
48
|
+
include Aws::Structure
|
49
|
+
end
|
127
50
|
|
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
|
-
|
51
|
+
# The statistics for a field calculated in the request.
|
52
|
+
#
|
53
|
+
# @!attribute [rw] min
|
54
|
+
# The minimum value found in the specified field in the result set.
|
55
|
+
#
|
56
|
+
# If the field is numeric (`int`, `int-array`, `double`, or
|
57
|
+
# `double-array`), `min` is the string representation of a
|
58
|
+
# double-precision 64-bit floating point value. If the field is `date`
|
59
|
+
# or `date-array`, `min` is the string representation of a date with
|
60
|
+
# the format specified in [IETF RFC3339][1]\:
|
61
|
+
# yyyy-mm-ddTHH:mm:ss.SSSZ.
|
62
|
+
#
|
63
|
+
#
|
64
|
+
#
|
65
|
+
# [1]: http://tools.ietf.org/html/rfc3339
|
66
|
+
# @return [String]
|
67
|
+
#
|
68
|
+
# @!attribute [rw] max
|
69
|
+
# The maximum value found in the specified field in the result set.
|
70
|
+
#
|
71
|
+
# If the field is numeric (`int`, `int-array`, `double`, or
|
72
|
+
# `double-array`), `max` is the string representation of a
|
73
|
+
# double-precision 64-bit floating point value. If the field is `date`
|
74
|
+
# or `date-array`, `max` is the string representation of a date with
|
75
|
+
# the format specified in [IETF RFC3339][1]\:
|
76
|
+
# yyyy-mm-ddTHH:mm:ss.SSSZ.
|
77
|
+
#
|
78
|
+
#
|
79
|
+
#
|
80
|
+
# [1]: http://tools.ietf.org/html/rfc3339
|
81
|
+
# @return [String]
|
82
|
+
#
|
83
|
+
# @!attribute [rw] count
|
84
|
+
# The number of documents that contain a value in the specified field
|
85
|
+
# in the result set.
|
86
|
+
# @return [Integer]
|
87
|
+
#
|
88
|
+
# @!attribute [rw] missing
|
89
|
+
# The number of documents that do not contain a value in the specified
|
90
|
+
# field in the result set.
|
91
|
+
# @return [Integer]
|
92
|
+
#
|
93
|
+
# @!attribute [rw] sum
|
94
|
+
# The sum of the field values across the documents in the result set.
|
95
|
+
# `null` for date fields.
|
96
|
+
# @return [Float]
|
97
|
+
#
|
98
|
+
# @!attribute [rw] sum_of_squares
|
99
|
+
# The sum of all field values in the result set squared.
|
100
|
+
# @return [Float]
|
101
|
+
#
|
102
|
+
# @!attribute [rw] mean
|
103
|
+
# The average of the values found in the specified field in the result
|
104
|
+
# set.
|
105
|
+
#
|
106
|
+
# If the field is numeric (`int`, `int-array`, `double`, or
|
107
|
+
# `double-array`), `mean` is the string representation of a
|
108
|
+
# double-precision 64-bit floating point value. If the field is `date`
|
109
|
+
# or `date-array`, `mean` is the string representation of a date with
|
110
|
+
# the format specified in [IETF RFC3339][1]\:
|
111
|
+
# yyyy-mm-ddTHH:mm:ss.SSSZ.
|
112
|
+
#
|
113
|
+
#
|
114
|
+
#
|
115
|
+
# [1]: http://tools.ietf.org/html/rfc3339
|
116
|
+
# @return [String]
|
117
|
+
#
|
118
|
+
# @!attribute [rw] stddev
|
119
|
+
# The standard deviation of the values in the specified field in the
|
120
|
+
# result set.
|
121
|
+
# @return [Float]
|
122
|
+
#
|
123
|
+
class FieldStats < Struct.new(
|
124
|
+
:min,
|
125
|
+
:max,
|
126
|
+
:count,
|
127
|
+
:missing,
|
128
|
+
:sum,
|
129
|
+
:sum_of_squares,
|
130
|
+
:mean,
|
131
|
+
:stddev)
|
132
|
+
include Aws::Structure
|
133
|
+
end
|
153
134
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
135
|
+
# Information about a document that matches the search request.
|
136
|
+
#
|
137
|
+
# @!attribute [rw] id
|
138
|
+
# The document ID of a document that matches the search request.
|
139
|
+
# @return [String]
|
140
|
+
#
|
141
|
+
# @!attribute [rw] fields
|
142
|
+
# The fields returned from a document that matches the search request.
|
143
|
+
# @return [Hash<String,Array<String>>]
|
144
|
+
#
|
145
|
+
# @!attribute [rw] exprs
|
146
|
+
# The expressions returned from a document that matches the search
|
147
|
+
# request.
|
148
|
+
# @return [Hash<String,String>]
|
149
|
+
#
|
150
|
+
# @!attribute [rw] highlights
|
151
|
+
# The highlights returned from a document that matches the search
|
152
|
+
# request.
|
153
|
+
# @return [Hash<String,String>]
|
154
|
+
#
|
155
|
+
class Hit < Struct.new(
|
156
|
+
:id,
|
157
|
+
:fields,
|
158
|
+
:exprs,
|
159
|
+
:highlights)
|
160
|
+
include Aws::Structure
|
161
|
+
end
|
178
162
|
|
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
|
-
# requests, specify the cursor value returned in the hits section of
|
206
|
-
# the response.
|
207
|
-
#
|
208
|
-
# For more information, see [Paginating Results][1] in the *Amazon
|
209
|
-
# CloudSearch Developer Guide*.
|
210
|
-
#
|
211
|
-
#
|
212
|
-
#
|
213
|
-
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html
|
214
|
-
# @return [String]
|
215
|
-
#
|
216
|
-
# @!attribute [rw] expr
|
217
|
-
# Defines one or more numeric expressions that can be used to sort
|
218
|
-
# results or specify search or filter criteria. You can also specify
|
219
|
-
# expressions as return fields.
|
220
|
-
#
|
221
|
-
# You specify the expressions in JSON using the form
|
222
|
-
# `\{"EXPRESSIONNAME":"EXPRESSION"\}`. You can define and use multiple
|
223
|
-
# expressions in a search request. For example:
|
224
|
-
#
|
225
|
-
# ` \{"expression1":"_score*rating", "expression2":"(1/rank)*year"\} `
|
226
|
-
#
|
227
|
-
# For information about the variables, operators, and functions you
|
228
|
-
# can use in expressions, see [Writing Expressions][1] in the *Amazon
|
229
|
-
# CloudSearch Developer Guide*.
|
230
|
-
#
|
231
|
-
#
|
232
|
-
#
|
233
|
-
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html#writing-expressions
|
234
|
-
# @return [String]
|
235
|
-
#
|
236
|
-
# @!attribute [rw] facet
|
237
|
-
# Specifies one or more fields for which to get facet information, and
|
238
|
-
# options that control how the facet information is returned. Each
|
239
|
-
# specified field must be facet-enabled in the domain configuration.
|
240
|
-
# The fields and options are specified in JSON using the form
|
241
|
-
# `\{"FIELD":\{"OPTION":VALUE,"OPTION:"STRING"\},"FIELD":\{"OPTION":VALUE,"OPTION":"STRING"\}\}`.
|
242
|
-
#
|
243
|
-
# You can specify the following faceting options:
|
244
|
-
#
|
245
|
-
# * `buckets` specifies an array of the facet values or ranges to
|
246
|
-
# count. Ranges are specified using the same syntax that you use to
|
247
|
-
# search for a range of values. For more information, see [
|
248
|
-
# Searching for a Range of Values][1] in the *Amazon CloudSearch
|
249
|
-
# Developer Guide*. Buckets are returned in the order they are
|
250
|
-
# specified in the request. The `sort` and `size` options are not
|
251
|
-
# valid if you specify `buckets`.
|
252
|
-
#
|
253
|
-
# * `size` specifies the maximum number of facets to include in the
|
254
|
-
# results. By default, Amazon CloudSearch returns counts for the top
|
255
|
-
# 10. The `size` parameter is only valid when you specify the `sort`
|
256
|
-
# option; it cannot be used in conjunction with `buckets`.
|
257
|
-
#
|
258
|
-
# * `sort` specifies how you want to sort the facets in the results:
|
259
|
-
# `bucket` or `count`. Specify `bucket` to sort alphabetically or
|
260
|
-
# numerically by facet value (in ascending order). Specify `count`
|
261
|
-
# to sort by the facet counts computed for each facet value (in
|
262
|
-
# descending order). To retrieve facet counts for particular values
|
263
|
-
# or ranges of values, use the `buckets` option instead of `sort`.
|
264
|
-
#
|
265
|
-
# If no facet options are specified, facet counts are computed for all
|
266
|
-
# field values, the facets are sorted by facet count, and the top 10
|
267
|
-
# facets are returned in the results.
|
268
|
-
#
|
269
|
-
# To count particular buckets of values, use the `buckets` option. For
|
270
|
-
# example, the following request uses the `buckets` option to
|
271
|
-
# calculate and return facet counts by decade.
|
272
|
-
#
|
273
|
-
# `
|
274
|
-
# \{"year":\{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,\}"]\}\}
|
275
|
-
# `
|
276
|
-
#
|
277
|
-
# To sort facets by facet count, use the `count` option. For example,
|
278
|
-
# the following request sets the `sort` option to `count` to sort the
|
279
|
-
# facet values by facet count, with the facet values that have the
|
280
|
-
# most matching documents listed first. Setting the `size` option to 3
|
281
|
-
# returns only the top three facet values.
|
282
|
-
#
|
283
|
-
# ` \{"year":\{"sort":"count","size":3\}\} `
|
284
|
-
#
|
285
|
-
# To sort the facets by value, use the `bucket` option. For example,
|
286
|
-
# the following request sets the `sort` option to `bucket` to sort the
|
287
|
-
# facet values numerically by year, with earliest year listed first.
|
288
|
-
#
|
289
|
-
# ` \{"year":\{"sort":"bucket"\}\} `
|
290
|
-
#
|
291
|
-
# For more information, see [Getting and Using Facet Information][2]
|
292
|
-
# in the *Amazon CloudSearch Developer Guide*.
|
293
|
-
#
|
294
|
-
#
|
295
|
-
#
|
296
|
-
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-ranges.html
|
297
|
-
# [2]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/faceting.html
|
298
|
-
# @return [String]
|
299
|
-
#
|
300
|
-
# @!attribute [rw] filter_query
|
301
|
-
# Specifies a structured query that filters the results of a search
|
302
|
-
# without affecting how the results are scored and sorted. You use
|
303
|
-
# `filterQuery` in conjunction with the `query` parameter to filter
|
304
|
-
# the documents that match the constraints specified in the `query`
|
305
|
-
# parameter. Specifying a filter controls only which matching
|
306
|
-
# documents are included in the results, it has no effect on how they
|
307
|
-
# are scored and sorted. The `filterQuery` parameter supports the full
|
308
|
-
# structured query syntax.
|
309
|
-
#
|
310
|
-
# For more information about using filters, see [Filtering Matching
|
311
|
-
# Documents][1] in the *Amazon CloudSearch Developer Guide*.
|
312
|
-
#
|
313
|
-
#
|
314
|
-
#
|
315
|
-
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/filtering-results.html
|
316
|
-
# @return [String]
|
317
|
-
#
|
318
|
-
# @!attribute [rw] highlight
|
319
|
-
# Retrieves highlights for matches in the specified `text` or
|
320
|
-
# `text-array` fields. Each specified field must be highlight enabled
|
321
|
-
# in the domain configuration. The fields and options are specified in
|
322
|
-
# JSON using the form
|
323
|
-
# `\{"FIELD":\{"OPTION":VALUE,"OPTION:"STRING"\},"FIELD":\{"OPTION":VALUE,"OPTION":"STRING"\}\}`.
|
324
|
-
#
|
325
|
-
# You can specify the following highlight options:
|
326
|
-
#
|
327
|
-
# * `format`\: specifies the format of the data in the text field:
|
328
|
-
# `text` or `html`. When data is returned as HTML, all
|
329
|
-
# non-alphanumeric characters are encoded. The default is `html`.
|
330
|
-
# * `max_phrases`\: specifies the maximum number of occurrences of the
|
331
|
-
# search term(s) you want to highlight. By default, the first
|
332
|
-
# occurrence is highlighted.
|
333
|
-
# * `pre_tag`\: specifies the string to prepend to an occurrence of a
|
334
|
-
# search term. The default for HTML highlights is `<em>`. The
|
335
|
-
# default for text highlights is `*`.
|
336
|
-
# * `post_tag`\: specifies the string to append to an occurrence of a
|
337
|
-
# search term. The default for HTML highlights is `</em>`. The
|
338
|
-
# default for text highlights is `*`.
|
339
|
-
#
|
340
|
-
# If no highlight options are specified for a field, the returned
|
341
|
-
# field text is treated as HTML and the first match is highlighted
|
342
|
-
# with emphasis tags: `<em>search-term</em>`.
|
343
|
-
#
|
344
|
-
# For example, the following request retrieves highlights for the
|
345
|
-
# `actors` and `title` fields.
|
346
|
-
#
|
347
|
-
# `\{ "actors": \{\}, "title": \{"format": "text","max_phrases":
|
348
|
-
# 2,"pre_tag": "","post_tag": ""\} \}`
|
349
|
-
# @return [String]
|
350
|
-
#
|
351
|
-
# @!attribute [rw] partial
|
352
|
-
# Enables partial results to be returned if one or more index
|
353
|
-
# partitions are unavailable. When your search index is partitioned
|
354
|
-
# across multiple search instances, by default Amazon CloudSearch only
|
355
|
-
# returns results if every partition can be queried. This means that
|
356
|
-
# the failure of a single search instance can result in 5xx (internal
|
357
|
-
# server) errors. When you enable partial results, Amazon CloudSearch
|
358
|
-
# returns whatever results are available and includes the percentage
|
359
|
-
# of documents searched in the search results (percent-searched). This
|
360
|
-
# enables you to more gracefully degrade your users' search
|
361
|
-
# experience. For example, rather than displaying no results, you
|
362
|
-
# could display the partial results and a message indicating that the
|
363
|
-
# results might be incomplete due to a temporary system outage.
|
364
|
-
# @return [Boolean]
|
365
|
-
#
|
366
|
-
# @!attribute [rw] query
|
367
|
-
# Specifies the search criteria for the request. How you specify the
|
368
|
-
# search criteria depends on the query parser used for the request and
|
369
|
-
# the parser options specified in the `queryOptions` parameter. By
|
370
|
-
# default, the `simple` query parser is used to process requests. To
|
371
|
-
# use the `structured`, `lucene`, or `dismax` query parser, you must
|
372
|
-
# also specify the `queryParser` parameter.
|
373
|
-
#
|
374
|
-
# For more information about specifying search criteria, see
|
375
|
-
# [Searching Your Data][1] in the *Amazon CloudSearch Developer
|
376
|
-
# Guide*.
|
377
|
-
#
|
378
|
-
#
|
379
|
-
#
|
380
|
-
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html
|
381
|
-
# @return [String]
|
382
|
-
#
|
383
|
-
# @!attribute [rw] query_options
|
384
|
-
# Configures options for the query parser specified in the
|
385
|
-
# `queryParser` parameter. You specify the options in JSON using the
|
386
|
-
# following form
|
387
|
-
# `\{"OPTION1":"VALUE1","OPTION2":VALUE2"..."OPTIONN":"VALUEN"\}.`
|
388
|
-
#
|
389
|
-
# The options you can configure vary according to which parser you
|
390
|
-
# use:
|
391
|
-
#
|
392
|
-
# * `defaultOperator`\: The default operator used to combine
|
393
|
-
# individual terms in the search string. For example:
|
394
|
-
# `defaultOperator: 'or'`. For the `dismax` parser, you specify a
|
395
|
-
# percentage that represents the percentage of terms in the search
|
396
|
-
# string (rounded down) that must match, rather than a default
|
397
|
-
# operator. A value of `0%` is the equivalent to OR, and a value of
|
398
|
-
# `100%` is equivalent to AND. The percentage must be specified as a
|
399
|
-
# value in the range 0-100 followed by the percent (%) symbol. For
|
400
|
-
# example, `defaultOperator: 50%`. Valid values: `and`, `or`, a
|
401
|
-
# percentage in the range 0%-100% (`dismax`). Default: `and`
|
402
|
-
# (`simple`, `structured`, `lucene`) or `100` (`dismax`). Valid for:
|
403
|
-
# `simple`, `structured`, `lucene`, and `dismax`.
|
404
|
-
# * `fields`\: An array of the fields to search when no fields are
|
405
|
-
# specified in a search. If no fields are specified in a search and
|
406
|
-
# this option is not specified, all text and text-array fields are
|
407
|
-
# searched. You can specify a weight for each field to control the
|
408
|
-
# relative importance of each field when Amazon CloudSearch
|
409
|
-
# calculates relevance scores. To specify a field weight, append a
|
410
|
-
# caret (`^`) symbol and the weight to the field name. For example,
|
411
|
-
# to boost the importance of the `title` field over the
|
412
|
-
# `description` field you could specify:
|
413
|
-
# `"fields":["title^5","description"]`. Valid values: The name of
|
414
|
-
# any configured field and an optional numeric value greater than
|
415
|
-
# zero. Default: All `text` and `text-array` fields. Valid for:
|
416
|
-
# `simple`, `structured`, `lucene`, and `dismax`.
|
417
|
-
# * `operators`\: An array of the operators or special characters you
|
418
|
-
# want to disable for the simple query parser. If you disable the
|
419
|
-
# `and`, `or`, or `not` operators, the corresponding operators (`+`,
|
420
|
-
# `|`, `-`) have no special meaning and are dropped from the search
|
421
|
-
# string. Similarly, disabling `prefix` disables the wildcard
|
422
|
-
# operator (`*`) and disabling `phrase` disables the ability to
|
423
|
-
# search for phrases by enclosing phrases in double quotes.
|
424
|
-
# Disabling precedence disables the ability to control order of
|
425
|
-
# precedence using parentheses. Disabling `near` disables the
|
426
|
-
# ability to use the ~ operator to perform a sloppy phrase search.
|
427
|
-
# Disabling the `fuzzy` operator disables the ability to use the ~
|
428
|
-
# operator to perform a fuzzy search. `escape` disables the ability
|
429
|
-
# to use a backslash (``) to escape special characters within the
|
430
|
-
# search string. Disabling whitespace is an advanced option that
|
431
|
-
# prevents the parser from tokenizing on whitespace, which can be
|
432
|
-
# useful for Vietnamese. (It prevents Vietnamese words from being
|
433
|
-
# split incorrectly.) For example, you could disable all operators
|
434
|
-
# other than the phrase operator to support just simple term and
|
435
|
-
# phrase queries: `"operators":["and","not","or", "prefix"]`. Valid
|
436
|
-
# values: `and`, `escape`, `fuzzy`, `near`, `not`, `or`, `phrase`,
|
437
|
-
# `precedence`, `prefix`, `whitespace`. Default: All operators and
|
438
|
-
# special characters are enabled. Valid for: `simple`.
|
439
|
-
# * `phraseFields`\: An array of the `text` or `text-array` fields you
|
440
|
-
# want to use for phrase searches. When the terms in the search
|
441
|
-
# string appear in close proximity within a field, the field scores
|
442
|
-
# higher. You can specify a weight for each field to boost that
|
443
|
-
# score. The `phraseSlop` option controls how much the matches can
|
444
|
-
# deviate from the search string and still be boosted. To specify a
|
445
|
-
# field weight, append a caret (`^`) symbol and the weight to the
|
446
|
-
# field name. For example, to boost phrase matches in the `title`
|
447
|
-
# field over the `abstract` field, you could specify:
|
448
|
-
# `"phraseFields":["title^3", "plot"]` Valid values: The name of any
|
449
|
-
# `text` or `text-array` field and an optional numeric value greater
|
450
|
-
# than zero. Default: No fields. If you don't specify any fields
|
451
|
-
# with `phraseFields`, proximity scoring is disabled even if
|
452
|
-
# `phraseSlop` is specified. Valid for: `dismax`.
|
453
|
-
# * `phraseSlop`\: An integer value that specifies how much matches
|
454
|
-
# can deviate from the search phrase and still be boosted according
|
455
|
-
# to the weights specified in the `phraseFields` option; for
|
456
|
-
# example, `phraseSlop: 2`. You must also specify `phraseFields` to
|
457
|
-
# enable proximity scoring. Valid values: positive integers.
|
458
|
-
# Default: 0. Valid for: `dismax`.
|
459
|
-
# * `explicitPhraseSlop`\: An integer value that specifies how much a
|
460
|
-
# match can deviate from the search phrase when the phrase is
|
461
|
-
# enclosed in double quotes in the search string. (Phrases that
|
462
|
-
# exceed this proximity distance are not considered a match.) For
|
463
|
-
# example, to specify a slop of three for dismax phrase queries, you
|
464
|
-
# would specify `"explicitPhraseSlop":3`. Valid values: positive
|
465
|
-
# integers. Default: 0. Valid for: `dismax`.
|
466
|
-
# * `tieBreaker`\: When a term in the search string is found in a
|
467
|
-
# document's field, a score is calculated for that field based on
|
468
|
-
# how common the word is in that field compared to other documents.
|
469
|
-
# If the term occurs in multiple fields within a document, by
|
470
|
-
# default only the highest scoring field contributes to the
|
471
|
-
# document's overall score. You can specify a `tieBreaker` value to
|
472
|
-
# enable the matches in lower-scoring fields to contribute to the
|
473
|
-
# document's score. That way, if two documents have the same max
|
474
|
-
# field score for a particular term, the score for the document that
|
475
|
-
# has matches in more fields will be higher. The formula for
|
476
|
-
# calculating the score with a tieBreaker is `(max field score) +
|
477
|
-
# (tieBreaker) * (sum of the scores for the rest of the matching
|
478
|
-
# fields)`. Set `tieBreaker` to 0 to disregard all but the highest
|
479
|
-
# scoring field (pure max): `"tieBreaker":0`. Set to 1 to sum the
|
480
|
-
# scores from all fields (pure sum): `"tieBreaker":1`. Valid values:
|
481
|
-
# 0.0 to 1.0. Default: 0.0. Valid for: `dismax`.
|
482
|
-
# @return [String]
|
483
|
-
#
|
484
|
-
# @!attribute [rw] query_parser
|
485
|
-
# Specifies which query parser to use to process the request. If
|
486
|
-
# `queryParser` is not specified, Amazon CloudSearch uses the `simple`
|
487
|
-
# query parser.
|
488
|
-
#
|
489
|
-
# Amazon CloudSearch supports four query parsers:
|
490
|
-
#
|
491
|
-
# * `simple`\: perform simple searches of `text` and `text-array`
|
492
|
-
# fields. By default, the `simple` query parser searches all `text`
|
493
|
-
# and `text-array` fields. You can specify which fields to search by
|
494
|
-
# with the `queryOptions` parameter. If you prefix a search term
|
495
|
-
# with a plus sign (+) documents must contain the term to be
|
496
|
-
# considered a match. (This is the default, unless you configure the
|
497
|
-
# default operator with the `queryOptions` parameter.) You can use
|
498
|
-
# the `-` (NOT), `|` (OR), and `*` (wildcard) operators to exclude
|
499
|
-
# particular terms, find results that match any of the specified
|
500
|
-
# terms, or search for a prefix. To search for a phrase rather than
|
501
|
-
# individual terms, enclose the phrase in double quotes. For more
|
502
|
-
# information, see [Searching for Text][1] in the *Amazon
|
503
|
-
# CloudSearch Developer Guide*.
|
504
|
-
# * `structured`\: perform advanced searches by combining multiple
|
505
|
-
# expressions to define the search criteria. You can also search
|
506
|
-
# within particular fields, search for values and ranges of values,
|
507
|
-
# and use advanced options such as term boosting, `matchall`, and
|
508
|
-
# `near`. For more information, see [Constructing Compound
|
509
|
-
# Queries][2] in the *Amazon CloudSearch Developer Guide*.
|
510
|
-
# * `lucene`\: search using the Apache Lucene query parser syntax. For
|
511
|
-
# more information, see [Apache Lucene Query Parser Syntax][3].
|
512
|
-
# * `dismax`\: search using the simplified subset of the Apache Lucene
|
513
|
-
# query parser syntax defined by the DisMax query parser. For more
|
514
|
-
# information, see [DisMax Query Parser Syntax][4].
|
515
|
-
#
|
516
|
-
#
|
517
|
-
#
|
518
|
-
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-text.html
|
519
|
-
# [2]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-compound-queries.html
|
520
|
-
# [3]: http://lucene.apache.org/core/4_6_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description
|
521
|
-
# [4]: http://wiki.apache.org/solr/DisMaxQParserPlugin#Query_Syntax
|
522
|
-
# @return [String]
|
523
|
-
#
|
524
|
-
# @!attribute [rw] return
|
525
|
-
# Specifies the field and expression values to include in the
|
526
|
-
# response. Multiple fields or expressions are specified as a
|
527
|
-
# comma-separated list. By default, a search response includes all
|
528
|
-
# return enabled fields (`_all_fields`). To return only the document
|
529
|
-
# IDs for the matching documents, specify `_no_fields`. To retrieve
|
530
|
-
# the relevance score calculated for each document, specify `_score`.
|
531
|
-
# @return [String]
|
532
|
-
#
|
533
|
-
# @!attribute [rw] size
|
534
|
-
# Specifies the maximum number of search hits to include in the
|
535
|
-
# response.
|
536
|
-
# @return [Integer]
|
537
|
-
#
|
538
|
-
# @!attribute [rw] sort
|
539
|
-
# Specifies the fields or custom expressions to use to sort the search
|
540
|
-
# results. Multiple fields or expressions are specified as a
|
541
|
-
# comma-separated list. You must specify the sort direction (`asc` or
|
542
|
-
# `desc`) for each field; for example, `year desc,title asc`. To use a
|
543
|
-
# field to sort results, the field must be sort-enabled in the domain
|
544
|
-
# configuration. Array type fields cannot be used for sorting. If no
|
545
|
-
# `sort` parameter is specified, results are sorted by their default
|
546
|
-
# relevance scores in descending order: `_score desc`. You can also
|
547
|
-
# sort by document ID (`_id asc`) and version (`_version desc`).
|
548
|
-
#
|
549
|
-
# For more information, see [Sorting Results][1] in the *Amazon
|
550
|
-
# CloudSearch Developer Guide*.
|
551
|
-
#
|
552
|
-
#
|
553
|
-
#
|
554
|
-
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/sorting-results.html
|
555
|
-
# @return [String]
|
556
|
-
#
|
557
|
-
# @!attribute [rw] start
|
558
|
-
# Specifies the offset of the first search hit you want to return.
|
559
|
-
# Note that the result set is zero-based; the first result is at index
|
560
|
-
# 0. You can specify either the `start` or `cursor` parameter in a
|
561
|
-
# request, they are mutually exclusive.
|
562
|
-
#
|
563
|
-
# For more information, see [Paginating Results][1] in the *Amazon
|
564
|
-
# CloudSearch Developer Guide*.
|
565
|
-
#
|
566
|
-
#
|
567
|
-
#
|
568
|
-
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html
|
569
|
-
# @return [Integer]
|
570
|
-
#
|
571
|
-
# @!attribute [rw] stats
|
572
|
-
# Specifies one or more fields for which to get statistics
|
573
|
-
# information. Each specified field must be facet-enabled in the
|
574
|
-
# domain configuration. The fields are specified in JSON using the
|
575
|
-
# form:
|
576
|
-
#
|
577
|
-
# `\{"FIELD-A":\{\},"FIELD-B":\{\}\}` There are currently no options supported for statistics.
|
578
|
-
# @return [String]
|
579
|
-
class SearchRequest < Struct.new(
|
580
|
-
:cursor,
|
581
|
-
:expr,
|
582
|
-
:facet,
|
583
|
-
:filter_query,
|
584
|
-
:highlight,
|
585
|
-
:partial,
|
586
|
-
:query,
|
587
|
-
:query_options,
|
588
|
-
:query_parser,
|
589
|
-
:return,
|
590
|
-
:size,
|
591
|
-
:sort,
|
592
|
-
:start,
|
593
|
-
:stats)
|
594
|
-
include Aws::Structure
|
595
|
-
end
|
163
|
+
# The collection of documents that match the search request.
|
164
|
+
#
|
165
|
+
# @!attribute [rw] found
|
166
|
+
# The total number of documents that match the search request.
|
167
|
+
# @return [Integer]
|
168
|
+
#
|
169
|
+
# @!attribute [rw] start
|
170
|
+
# The index of the first matching document.
|
171
|
+
# @return [Integer]
|
172
|
+
#
|
173
|
+
# @!attribute [rw] cursor
|
174
|
+
# A cursor that can be used to retrieve the next set of matching
|
175
|
+
# documents when you want to page through a large result set.
|
176
|
+
# @return [String]
|
177
|
+
#
|
178
|
+
# @!attribute [rw] hit
|
179
|
+
# A document that matches the search request.
|
180
|
+
# @return [Array<Types::Hit>]
|
181
|
+
#
|
182
|
+
class Hits < Struct.new(
|
183
|
+
:found,
|
184
|
+
:start,
|
185
|
+
:cursor,
|
186
|
+
:hit)
|
187
|
+
include Aws::Structure
|
188
|
+
end
|
596
189
|
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
190
|
+
# Container for the parameters to the `Search` request.
|
191
|
+
#
|
192
|
+
# @note When making an API call, you may pass SearchRequest
|
193
|
+
# data as a hash:
|
194
|
+
#
|
195
|
+
# {
|
196
|
+
# cursor: "Cursor",
|
197
|
+
# expr: "Expr",
|
198
|
+
# facet: "Facet",
|
199
|
+
# filter_query: "FilterQuery",
|
200
|
+
# highlight: "Highlight",
|
201
|
+
# partial: false,
|
202
|
+
# query: "Query", # required
|
203
|
+
# query_options: "QueryOptions",
|
204
|
+
# query_parser: "simple", # accepts simple, structured, lucene, dismax
|
205
|
+
# return: "Return",
|
206
|
+
# size: 1,
|
207
|
+
# sort: "Sort",
|
208
|
+
# start: 1,
|
209
|
+
# stats: "Stat",
|
210
|
+
# }
|
211
|
+
#
|
212
|
+
# @!attribute [rw] cursor
|
213
|
+
# Retrieves a cursor value you can use to page through large result
|
214
|
+
# sets. Use the `size` parameter to control the number of hits to
|
215
|
+
# include in each response. You can specify either the `cursor` or
|
216
|
+
# `start` parameter in a request; they are mutually exclusive. To get
|
217
|
+
# the first cursor, set the cursor value to `initial`. In subsequent
|
218
|
+
# requests, specify the cursor value returned in the hits section of
|
219
|
+
# the response.
|
220
|
+
#
|
221
|
+
# For more information, see [Paginating Results][1] in the *Amazon
|
222
|
+
# CloudSearch Developer Guide*.
|
223
|
+
#
|
224
|
+
#
|
225
|
+
#
|
226
|
+
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html
|
227
|
+
# @return [String]
|
228
|
+
#
|
229
|
+
# @!attribute [rw] expr
|
230
|
+
# Defines one or more numeric expressions that can be used to sort
|
231
|
+
# results or specify search or filter criteria. You can also specify
|
232
|
+
# expressions as return fields.
|
233
|
+
#
|
234
|
+
# You specify the expressions in JSON using the form
|
235
|
+
# `\{"EXPRESSIONNAME":"EXPRESSION"\}`. You can define and use multiple
|
236
|
+
# expressions in a search request. For example:
|
237
|
+
#
|
238
|
+
# ` \{"expression1":"_score*rating", "expression2":"(1/rank)*year"\} `
|
239
|
+
#
|
240
|
+
# For information about the variables, operators, and functions you
|
241
|
+
# can use in expressions, see [Writing Expressions][1] in the *Amazon
|
242
|
+
# CloudSearch Developer Guide*.
|
243
|
+
#
|
244
|
+
#
|
245
|
+
#
|
246
|
+
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html#writing-expressions
|
247
|
+
# @return [String]
|
248
|
+
#
|
249
|
+
# @!attribute [rw] facet
|
250
|
+
# Specifies one or more fields for which to get facet information, and
|
251
|
+
# options that control how the facet information is returned. Each
|
252
|
+
# specified field must be facet-enabled in the domain configuration.
|
253
|
+
# The fields and options are specified in JSON using the form
|
254
|
+
# `\{"FIELD":\{"OPTION":VALUE,"OPTION:"STRING"\},"FIELD":\{"OPTION":VALUE,"OPTION":"STRING"\}\}`.
|
255
|
+
#
|
256
|
+
# You can specify the following faceting options:
|
257
|
+
#
|
258
|
+
# * `buckets` specifies an array of the facet values or ranges to
|
259
|
+
# count. Ranges are specified using the same syntax that you use to
|
260
|
+
# search for a range of values. For more information, see [
|
261
|
+
# Searching for a Range of Values][1] in the *Amazon CloudSearch
|
262
|
+
# Developer Guide*. Buckets are returned in the order they are
|
263
|
+
# specified in the request. The `sort` and `size` options are not
|
264
|
+
# valid if you specify `buckets`.
|
265
|
+
#
|
266
|
+
# * `size` specifies the maximum number of facets to include in the
|
267
|
+
# results. By default, Amazon CloudSearch returns counts for the top
|
268
|
+
# 10. The `size` parameter is only valid when you specify the `sort`
|
269
|
+
# option; it cannot be used in conjunction with `buckets`.
|
270
|
+
#
|
271
|
+
# * `sort` specifies how you want to sort the facets in the results:
|
272
|
+
# `bucket` or `count`. Specify `bucket` to sort alphabetically or
|
273
|
+
# numerically by facet value (in ascending order). Specify `count`
|
274
|
+
# to sort by the facet counts computed for each facet value (in
|
275
|
+
# descending order). To retrieve facet counts for particular values
|
276
|
+
# or ranges of values, use the `buckets` option instead of `sort`.
|
277
|
+
#
|
278
|
+
# If no facet options are specified, facet counts are computed for all
|
279
|
+
# field values, the facets are sorted by facet count, and the top 10
|
280
|
+
# facets are returned in the results.
|
281
|
+
#
|
282
|
+
# To count particular buckets of values, use the `buckets` option. For
|
283
|
+
# example, the following request uses the `buckets` option to
|
284
|
+
# calculate and return facet counts by decade.
|
285
|
+
#
|
286
|
+
# `
|
287
|
+
# \{"year":\{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,\}"]\}\}
|
288
|
+
# `
|
289
|
+
#
|
290
|
+
# To sort facets by facet count, use the `count` option. For example,
|
291
|
+
# the following request sets the `sort` option to `count` to sort the
|
292
|
+
# facet values by facet count, with the facet values that have the
|
293
|
+
# most matching documents listed first. Setting the `size` option to 3
|
294
|
+
# returns only the top three facet values.
|
295
|
+
#
|
296
|
+
# ` \{"year":\{"sort":"count","size":3\}\} `
|
297
|
+
#
|
298
|
+
# To sort the facets by value, use the `bucket` option. For example,
|
299
|
+
# the following request sets the `sort` option to `bucket` to sort the
|
300
|
+
# facet values numerically by year, with earliest year listed first.
|
301
|
+
#
|
302
|
+
# ` \{"year":\{"sort":"bucket"\}\} `
|
303
|
+
#
|
304
|
+
# For more information, see [Getting and Using Facet Information][2]
|
305
|
+
# in the *Amazon CloudSearch Developer Guide*.
|
306
|
+
#
|
307
|
+
#
|
308
|
+
#
|
309
|
+
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-ranges.html
|
310
|
+
# [2]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/faceting.html
|
311
|
+
# @return [String]
|
312
|
+
#
|
313
|
+
# @!attribute [rw] filter_query
|
314
|
+
# Specifies a structured query that filters the results of a search
|
315
|
+
# without affecting how the results are scored and sorted. You use
|
316
|
+
# `filterQuery` in conjunction with the `query` parameter to filter
|
317
|
+
# the documents that match the constraints specified in the `query`
|
318
|
+
# parameter. Specifying a filter controls only which matching
|
319
|
+
# documents are included in the results, it has no effect on how they
|
320
|
+
# are scored and sorted. The `filterQuery` parameter supports the full
|
321
|
+
# structured query syntax.
|
322
|
+
#
|
323
|
+
# For more information about using filters, see [Filtering Matching
|
324
|
+
# Documents][1] in the *Amazon CloudSearch Developer Guide*.
|
325
|
+
#
|
326
|
+
#
|
327
|
+
#
|
328
|
+
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/filtering-results.html
|
329
|
+
# @return [String]
|
330
|
+
#
|
331
|
+
# @!attribute [rw] highlight
|
332
|
+
# Retrieves highlights for matches in the specified `text` or
|
333
|
+
# `text-array` fields. Each specified field must be highlight enabled
|
334
|
+
# in the domain configuration. The fields and options are specified in
|
335
|
+
# JSON using the form
|
336
|
+
# `\{"FIELD":\{"OPTION":VALUE,"OPTION:"STRING"\},"FIELD":\{"OPTION":VALUE,"OPTION":"STRING"\}\}`.
|
337
|
+
#
|
338
|
+
# You can specify the following highlight options:
|
339
|
+
#
|
340
|
+
# * `format`\: specifies the format of the data in the text field:
|
341
|
+
# `text` or `html`. When data is returned as HTML, all
|
342
|
+
# non-alphanumeric characters are encoded. The default is `html`.
|
343
|
+
# * `max_phrases`\: specifies the maximum number of occurrences of the
|
344
|
+
# search term(s) you want to highlight. By default, the first
|
345
|
+
# occurrence is highlighted.
|
346
|
+
# * `pre_tag`\: specifies the string to prepend to an occurrence of a
|
347
|
+
# search term. The default for HTML highlights is `<em>`. The
|
348
|
+
# default for text highlights is `*`.
|
349
|
+
# * `post_tag`\: specifies the string to append to an occurrence of a
|
350
|
+
# search term. The default for HTML highlights is `</em>`. The
|
351
|
+
# default for text highlights is `*`.
|
352
|
+
#
|
353
|
+
# If no highlight options are specified for a field, the returned
|
354
|
+
# field text is treated as HTML and the first match is highlighted
|
355
|
+
# with emphasis tags: `<em>search-term</em>`.
|
356
|
+
#
|
357
|
+
# For example, the following request retrieves highlights for the
|
358
|
+
# `actors` and `title` fields.
|
359
|
+
#
|
360
|
+
# `\{ "actors": \{\}, "title": \{"format": "text","max_phrases":
|
361
|
+
# 2,"pre_tag": "","post_tag": ""\} \}`
|
362
|
+
# @return [String]
|
363
|
+
#
|
364
|
+
# @!attribute [rw] partial
|
365
|
+
# Enables partial results to be returned if one or more index
|
366
|
+
# partitions are unavailable. When your search index is partitioned
|
367
|
+
# across multiple search instances, by default Amazon CloudSearch only
|
368
|
+
# returns results if every partition can be queried. This means that
|
369
|
+
# the failure of a single search instance can result in 5xx (internal
|
370
|
+
# server) errors. When you enable partial results, Amazon CloudSearch
|
371
|
+
# returns whatever results are available and includes the percentage
|
372
|
+
# of documents searched in the search results (percent-searched). This
|
373
|
+
# enables you to more gracefully degrade your users' search
|
374
|
+
# experience. For example, rather than displaying no results, you
|
375
|
+
# could display the partial results and a message indicating that the
|
376
|
+
# results might be incomplete due to a temporary system outage.
|
377
|
+
# @return [Boolean]
|
378
|
+
#
|
379
|
+
# @!attribute [rw] query
|
380
|
+
# Specifies the search criteria for the request. How you specify the
|
381
|
+
# search criteria depends on the query parser used for the request and
|
382
|
+
# the parser options specified in the `queryOptions` parameter. By
|
383
|
+
# default, the `simple` query parser is used to process requests. To
|
384
|
+
# use the `structured`, `lucene`, or `dismax` query parser, you must
|
385
|
+
# also specify the `queryParser` parameter.
|
386
|
+
#
|
387
|
+
# For more information about specifying search criteria, see
|
388
|
+
# [Searching Your Data][1] in the *Amazon CloudSearch Developer
|
389
|
+
# Guide*.
|
390
|
+
#
|
391
|
+
#
|
392
|
+
#
|
393
|
+
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html
|
394
|
+
# @return [String]
|
395
|
+
#
|
396
|
+
# @!attribute [rw] query_options
|
397
|
+
# Configures options for the query parser specified in the
|
398
|
+
# `queryParser` parameter. You specify the options in JSON using the
|
399
|
+
# following form
|
400
|
+
# `\{"OPTION1":"VALUE1","OPTION2":VALUE2"..."OPTIONN":"VALUEN"\}.`
|
401
|
+
#
|
402
|
+
# The options you can configure vary according to which parser you
|
403
|
+
# use:
|
404
|
+
#
|
405
|
+
# * `defaultOperator`\: The default operator used to combine
|
406
|
+
# individual terms in the search string. For example:
|
407
|
+
# `defaultOperator: 'or'`. For the `dismax` parser, you specify a
|
408
|
+
# percentage that represents the percentage of terms in the search
|
409
|
+
# string (rounded down) that must match, rather than a default
|
410
|
+
# operator. A value of `0%` is the equivalent to OR, and a value of
|
411
|
+
# `100%` is equivalent to AND. The percentage must be specified as a
|
412
|
+
# value in the range 0-100 followed by the percent (%) symbol. For
|
413
|
+
# example, `defaultOperator: 50%`. Valid values: `and`, `or`, a
|
414
|
+
# percentage in the range 0%-100% (`dismax`). Default: `and`
|
415
|
+
# (`simple`, `structured`, `lucene`) or `100` (`dismax`). Valid for:
|
416
|
+
# `simple`, `structured`, `lucene`, and `dismax`.
|
417
|
+
# * `fields`\: An array of the fields to search when no fields are
|
418
|
+
# specified in a search. If no fields are specified in a search and
|
419
|
+
# this option is not specified, all text and text-array fields are
|
420
|
+
# searched. You can specify a weight for each field to control the
|
421
|
+
# relative importance of each field when Amazon CloudSearch
|
422
|
+
# calculates relevance scores. To specify a field weight, append a
|
423
|
+
# caret (`^`) symbol and the weight to the field name. For example,
|
424
|
+
# to boost the importance of the `title` field over the
|
425
|
+
# `description` field you could specify:
|
426
|
+
# `"fields":["title^5","description"]`. Valid values: The name of
|
427
|
+
# any configured field and an optional numeric value greater than
|
428
|
+
# zero. Default: All `text` and `text-array` fields. Valid for:
|
429
|
+
# `simple`, `structured`, `lucene`, and `dismax`.
|
430
|
+
# * `operators`\: An array of the operators or special characters you
|
431
|
+
# want to disable for the simple query parser. If you disable the
|
432
|
+
# `and`, `or`, or `not` operators, the corresponding operators (`+`,
|
433
|
+
# `|`, `-`) have no special meaning and are dropped from the search
|
434
|
+
# string. Similarly, disabling `prefix` disables the wildcard
|
435
|
+
# operator (`*`) and disabling `phrase` disables the ability to
|
436
|
+
# search for phrases by enclosing phrases in double quotes.
|
437
|
+
# Disabling precedence disables the ability to control order of
|
438
|
+
# precedence using parentheses. Disabling `near` disables the
|
439
|
+
# ability to use the ~ operator to perform a sloppy phrase search.
|
440
|
+
# Disabling the `fuzzy` operator disables the ability to use the ~
|
441
|
+
# operator to perform a fuzzy search. `escape` disables the ability
|
442
|
+
# to use a backslash (``) to escape special characters within the
|
443
|
+
# search string. Disabling whitespace is an advanced option that
|
444
|
+
# prevents the parser from tokenizing on whitespace, which can be
|
445
|
+
# useful for Vietnamese. (It prevents Vietnamese words from being
|
446
|
+
# split incorrectly.) For example, you could disable all operators
|
447
|
+
# other than the phrase operator to support just simple term and
|
448
|
+
# phrase queries: `"operators":["and","not","or", "prefix"]`. Valid
|
449
|
+
# values: `and`, `escape`, `fuzzy`, `near`, `not`, `or`, `phrase`,
|
450
|
+
# `precedence`, `prefix`, `whitespace`. Default: All operators and
|
451
|
+
# special characters are enabled. Valid for: `simple`.
|
452
|
+
# * `phraseFields`\: An array of the `text` or `text-array` fields you
|
453
|
+
# want to use for phrase searches. When the terms in the search
|
454
|
+
# string appear in close proximity within a field, the field scores
|
455
|
+
# higher. You can specify a weight for each field to boost that
|
456
|
+
# score. The `phraseSlop` option controls how much the matches can
|
457
|
+
# deviate from the search string and still be boosted. To specify a
|
458
|
+
# field weight, append a caret (`^`) symbol and the weight to the
|
459
|
+
# field name. For example, to boost phrase matches in the `title`
|
460
|
+
# field over the `abstract` field, you could specify:
|
461
|
+
# `"phraseFields":["title^3", "plot"]` Valid values: The name of any
|
462
|
+
# `text` or `text-array` field and an optional numeric value greater
|
463
|
+
# than zero. Default: No fields. If you don't specify any fields
|
464
|
+
# with `phraseFields`, proximity scoring is disabled even if
|
465
|
+
# `phraseSlop` is specified. Valid for: `dismax`.
|
466
|
+
# * `phraseSlop`\: An integer value that specifies how much matches
|
467
|
+
# can deviate from the search phrase and still be boosted according
|
468
|
+
# to the weights specified in the `phraseFields` option; for
|
469
|
+
# example, `phraseSlop: 2`. You must also specify `phraseFields` to
|
470
|
+
# enable proximity scoring. Valid values: positive integers.
|
471
|
+
# Default: 0. Valid for: `dismax`.
|
472
|
+
# * `explicitPhraseSlop`\: An integer value that specifies how much a
|
473
|
+
# match can deviate from the search phrase when the phrase is
|
474
|
+
# enclosed in double quotes in the search string. (Phrases that
|
475
|
+
# exceed this proximity distance are not considered a match.) For
|
476
|
+
# example, to specify a slop of three for dismax phrase queries, you
|
477
|
+
# would specify `"explicitPhraseSlop":3`. Valid values: positive
|
478
|
+
# integers. Default: 0. Valid for: `dismax`.
|
479
|
+
# * `tieBreaker`\: When a term in the search string is found in a
|
480
|
+
# document's field, a score is calculated for that field based on
|
481
|
+
# how common the word is in that field compared to other documents.
|
482
|
+
# If the term occurs in multiple fields within a document, by
|
483
|
+
# default only the highest scoring field contributes to the
|
484
|
+
# document's overall score. You can specify a `tieBreaker` value to
|
485
|
+
# enable the matches in lower-scoring fields to contribute to the
|
486
|
+
# document's score. That way, if two documents have the same max
|
487
|
+
# field score for a particular term, the score for the document that
|
488
|
+
# has matches in more fields will be higher. The formula for
|
489
|
+
# calculating the score with a tieBreaker is `(max field score) +
|
490
|
+
# (tieBreaker) * (sum of the scores for the rest of the matching
|
491
|
+
# fields)`. Set `tieBreaker` to 0 to disregard all but the highest
|
492
|
+
# scoring field (pure max): `"tieBreaker":0`. Set to 1 to sum the
|
493
|
+
# scores from all fields (pure sum): `"tieBreaker":1`. Valid values:
|
494
|
+
# 0.0 to 1.0. Default: 0.0. Valid for: `dismax`.
|
495
|
+
# @return [String]
|
496
|
+
#
|
497
|
+
# @!attribute [rw] query_parser
|
498
|
+
# Specifies which query parser to use to process the request. If
|
499
|
+
# `queryParser` is not specified, Amazon CloudSearch uses the `simple`
|
500
|
+
# query parser.
|
501
|
+
#
|
502
|
+
# Amazon CloudSearch supports four query parsers:
|
503
|
+
#
|
504
|
+
# * `simple`\: perform simple searches of `text` and `text-array`
|
505
|
+
# fields. By default, the `simple` query parser searches all `text`
|
506
|
+
# and `text-array` fields. You can specify which fields to search by
|
507
|
+
# with the `queryOptions` parameter. If you prefix a search term
|
508
|
+
# with a plus sign (+) documents must contain the term to be
|
509
|
+
# considered a match. (This is the default, unless you configure the
|
510
|
+
# default operator with the `queryOptions` parameter.) You can use
|
511
|
+
# the `-` (NOT), `|` (OR), and `*` (wildcard) operators to exclude
|
512
|
+
# particular terms, find results that match any of the specified
|
513
|
+
# terms, or search for a prefix. To search for a phrase rather than
|
514
|
+
# individual terms, enclose the phrase in double quotes. For more
|
515
|
+
# information, see [Searching for Text][1] in the *Amazon
|
516
|
+
# CloudSearch Developer Guide*.
|
517
|
+
# * `structured`\: perform advanced searches by combining multiple
|
518
|
+
# expressions to define the search criteria. You can also search
|
519
|
+
# within particular fields, search for values and ranges of values,
|
520
|
+
# and use advanced options such as term boosting, `matchall`, and
|
521
|
+
# `near`. For more information, see [Constructing Compound
|
522
|
+
# Queries][2] in the *Amazon CloudSearch Developer Guide*.
|
523
|
+
# * `lucene`\: search using the Apache Lucene query parser syntax. For
|
524
|
+
# more information, see [Apache Lucene Query Parser Syntax][3].
|
525
|
+
# * `dismax`\: search using the simplified subset of the Apache Lucene
|
526
|
+
# query parser syntax defined by the DisMax query parser. For more
|
527
|
+
# information, see [DisMax Query Parser Syntax][4].
|
528
|
+
#
|
529
|
+
#
|
530
|
+
#
|
531
|
+
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-text.html
|
532
|
+
# [2]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-compound-queries.html
|
533
|
+
# [3]: http://lucene.apache.org/core/4_6_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description
|
534
|
+
# [4]: http://wiki.apache.org/solr/DisMaxQParserPlugin#Query_Syntax
|
535
|
+
# @return [String]
|
536
|
+
#
|
537
|
+
# @!attribute [rw] return
|
538
|
+
# Specifies the field and expression values to include in the
|
539
|
+
# response. Multiple fields or expressions are specified as a
|
540
|
+
# comma-separated list. By default, a search response includes all
|
541
|
+
# return enabled fields (`_all_fields`). To return only the document
|
542
|
+
# IDs for the matching documents, specify `_no_fields`. To retrieve
|
543
|
+
# the relevance score calculated for each document, specify `_score`.
|
544
|
+
# @return [String]
|
545
|
+
#
|
546
|
+
# @!attribute [rw] size
|
547
|
+
# Specifies the maximum number of search hits to include in the
|
548
|
+
# response.
|
549
|
+
# @return [Integer]
|
550
|
+
#
|
551
|
+
# @!attribute [rw] sort
|
552
|
+
# Specifies the fields or custom expressions to use to sort the search
|
553
|
+
# results. Multiple fields or expressions are specified as a
|
554
|
+
# comma-separated list. You must specify the sort direction (`asc` or
|
555
|
+
# `desc`) for each field; for example, `year desc,title asc`. To use a
|
556
|
+
# field to sort results, the field must be sort-enabled in the domain
|
557
|
+
# configuration. Array type fields cannot be used for sorting. If no
|
558
|
+
# `sort` parameter is specified, results are sorted by their default
|
559
|
+
# relevance scores in descending order: `_score desc`. You can also
|
560
|
+
# sort by document ID (`_id asc`) and version (`_version desc`).
|
561
|
+
#
|
562
|
+
# For more information, see [Sorting Results][1] in the *Amazon
|
563
|
+
# CloudSearch Developer Guide*.
|
564
|
+
#
|
565
|
+
#
|
566
|
+
#
|
567
|
+
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/sorting-results.html
|
568
|
+
# @return [String]
|
569
|
+
#
|
570
|
+
# @!attribute [rw] start
|
571
|
+
# Specifies the offset of the first search hit you want to return.
|
572
|
+
# Note that the result set is zero-based; the first result is at index
|
573
|
+
# 0. You can specify either the `start` or `cursor` parameter in a
|
574
|
+
# request, they are mutually exclusive.
|
575
|
+
#
|
576
|
+
# For more information, see [Paginating Results][1] in the *Amazon
|
577
|
+
# CloudSearch Developer Guide*.
|
578
|
+
#
|
579
|
+
#
|
580
|
+
#
|
581
|
+
# [1]: http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html
|
582
|
+
# @return [Integer]
|
583
|
+
#
|
584
|
+
# @!attribute [rw] stats
|
585
|
+
# Specifies one or more fields for which to get statistics
|
586
|
+
# information. Each specified field must be facet-enabled in the
|
587
|
+
# domain configuration. The fields are specified in JSON using the
|
588
|
+
# form:
|
589
|
+
#
|
590
|
+
# `\{"FIELD-A":\{\},"FIELD-B":\{\}\}` There are currently no options supported for statistics.
|
591
|
+
# @return [String]
|
592
|
+
#
|
593
|
+
class SearchRequest < Struct.new(
|
594
|
+
:cursor,
|
595
|
+
:expr,
|
596
|
+
:facet,
|
597
|
+
:filter_query,
|
598
|
+
:highlight,
|
599
|
+
:partial,
|
600
|
+
:query,
|
601
|
+
:query_options,
|
602
|
+
:query_parser,
|
603
|
+
:return,
|
604
|
+
:size,
|
605
|
+
:sort,
|
606
|
+
:start,
|
607
|
+
:stats)
|
608
|
+
include Aws::Structure
|
609
|
+
end
|
622
610
|
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
611
|
+
# The result of a `Search` request. Contains the documents that match
|
612
|
+
# the specified search criteria and any requested fields, highlights,
|
613
|
+
# and facet information.
|
614
|
+
#
|
615
|
+
# @!attribute [rw] status
|
616
|
+
# The status information returned for the search request.
|
617
|
+
# @return [Types::SearchStatus]
|
618
|
+
#
|
619
|
+
# @!attribute [rw] hits
|
620
|
+
# The documents that match the search criteria.
|
621
|
+
# @return [Types::Hits]
|
622
|
+
#
|
623
|
+
# @!attribute [rw] facets
|
624
|
+
# The requested facet information.
|
625
|
+
# @return [Hash<String,Types::BucketInfo>]
|
626
|
+
#
|
627
|
+
# @!attribute [rw] stats
|
628
|
+
# The requested field statistics information.
|
629
|
+
# @return [Hash<String,Types::FieldStats>]
|
630
|
+
#
|
631
|
+
class SearchResponse < Struct.new(
|
632
|
+
:status,
|
633
|
+
:hits,
|
634
|
+
:facets,
|
635
|
+
:stats)
|
636
|
+
include Aws::Structure
|
637
|
+
end
|
637
638
|
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
:suggestions)
|
655
|
-
include Aws::Structure
|
656
|
-
end
|
639
|
+
# Contains the resource id (`rid`) and the time it took to process the
|
640
|
+
# request (`timems`).
|
641
|
+
#
|
642
|
+
# @!attribute [rw] timems
|
643
|
+
# How long it took to process the request, in milliseconds.
|
644
|
+
# @return [Integer]
|
645
|
+
#
|
646
|
+
# @!attribute [rw] rid
|
647
|
+
# The encrypted resource ID for the request.
|
648
|
+
# @return [String]
|
649
|
+
#
|
650
|
+
class SearchStatus < Struct.new(
|
651
|
+
:timems,
|
652
|
+
:rid)
|
653
|
+
include Aws::Structure
|
654
|
+
end
|
657
655
|
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
class SuggestRequest < Struct.new(
|
680
|
-
:query,
|
681
|
-
:suggester,
|
682
|
-
:size)
|
683
|
-
include Aws::Structure
|
684
|
-
end
|
656
|
+
# Container for the suggestion information returned in a
|
657
|
+
# `SuggestResponse`.
|
658
|
+
#
|
659
|
+
# @!attribute [rw] query
|
660
|
+
# The query string specified in the suggest request.
|
661
|
+
# @return [String]
|
662
|
+
#
|
663
|
+
# @!attribute [rw] found
|
664
|
+
# The number of documents that were found to match the query string.
|
665
|
+
# @return [Integer]
|
666
|
+
#
|
667
|
+
# @!attribute [rw] suggestions
|
668
|
+
# The documents that match the query string.
|
669
|
+
# @return [Array<Types::SuggestionMatch>]
|
670
|
+
#
|
671
|
+
class SuggestModel < Struct.new(
|
672
|
+
:query,
|
673
|
+
:found,
|
674
|
+
:suggestions)
|
675
|
+
include Aws::Structure
|
676
|
+
end
|
685
677
|
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
678
|
+
# Container for the parameters to the `Suggest` request.
|
679
|
+
#
|
680
|
+
# @note When making an API call, you may pass SuggestRequest
|
681
|
+
# data as a hash:
|
682
|
+
#
|
683
|
+
# {
|
684
|
+
# query: "Query", # required
|
685
|
+
# suggester: "Suggester", # required
|
686
|
+
# size: 1,
|
687
|
+
# }
|
688
|
+
#
|
689
|
+
# @!attribute [rw] query
|
690
|
+
# Specifies the string for which you want to get suggestions.
|
691
|
+
# @return [String]
|
692
|
+
#
|
693
|
+
# @!attribute [rw] suggester
|
694
|
+
# Specifies the name of the suggester to use to find suggested
|
695
|
+
# matches.
|
696
|
+
# @return [String]
|
697
|
+
#
|
698
|
+
# @!attribute [rw] size
|
699
|
+
# Specifies the maximum number of suggestions to return.
|
700
|
+
# @return [Integer]
|
701
|
+
#
|
702
|
+
class SuggestRequest < Struct.new(
|
703
|
+
:query,
|
704
|
+
:suggester,
|
705
|
+
:size)
|
706
|
+
include Aws::Structure
|
707
|
+
end
|
700
708
|
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
709
|
+
# Contains the response to a `Suggest` request.
|
710
|
+
#
|
711
|
+
# @!attribute [rw] status
|
712
|
+
# The status of a `SuggestRequest`. Contains the resource ID (`rid`)
|
713
|
+
# and how long it took to process the request (`timems`).
|
714
|
+
# @return [Types::SuggestStatus]
|
715
|
+
#
|
716
|
+
# @!attribute [rw] suggest
|
717
|
+
# Container for the matching search suggestion information.
|
718
|
+
# @return [Types::SuggestModel]
|
719
|
+
#
|
720
|
+
class SuggestResponse < Struct.new(
|
721
|
+
:status,
|
722
|
+
:suggest)
|
723
|
+
include Aws::Structure
|
724
|
+
end
|
715
725
|
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
:score,
|
733
|
-
:id)
|
734
|
-
include Aws::Structure
|
735
|
-
end
|
726
|
+
# Contains the resource id (`rid`) and the time it took to process the
|
727
|
+
# request (`timems`).
|
728
|
+
#
|
729
|
+
# @!attribute [rw] timems
|
730
|
+
# How long it took to process the request, in milliseconds.
|
731
|
+
# @return [Integer]
|
732
|
+
#
|
733
|
+
# @!attribute [rw] rid
|
734
|
+
# The encrypted resource ID for the request.
|
735
|
+
# @return [String]
|
736
|
+
#
|
737
|
+
class SuggestStatus < Struct.new(
|
738
|
+
:timems,
|
739
|
+
:rid)
|
740
|
+
include Aws::Structure
|
741
|
+
end
|
736
742
|
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
include Aws::Structure
|
760
|
-
end
|
743
|
+
# An autocomplete suggestion that matches the query string specified in
|
744
|
+
# a `SuggestRequest`.
|
745
|
+
#
|
746
|
+
# @!attribute [rw] suggestion
|
747
|
+
# The string that matches the query string specified in the
|
748
|
+
# `SuggestRequest`.
|
749
|
+
# @return [String]
|
750
|
+
#
|
751
|
+
# @!attribute [rw] score
|
752
|
+
# The relevance score of a suggested match.
|
753
|
+
# @return [Integer]
|
754
|
+
#
|
755
|
+
# @!attribute [rw] id
|
756
|
+
# The document ID of the suggested document.
|
757
|
+
# @return [String]
|
758
|
+
#
|
759
|
+
class SuggestionMatch < Struct.new(
|
760
|
+
:suggestion,
|
761
|
+
:score,
|
762
|
+
:id)
|
763
|
+
include Aws::Structure
|
764
|
+
end
|
761
765
|
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
766
|
+
# Container for the parameters to the `UploadDocuments` request.
|
767
|
+
#
|
768
|
+
# @note When making an API call, you may pass UploadDocumentsRequest
|
769
|
+
# data as a hash:
|
770
|
+
#
|
771
|
+
# {
|
772
|
+
# documents: "data", # required
|
773
|
+
# content_type: "application/json", # required, accepts application/json, application/xml
|
774
|
+
# }
|
775
|
+
#
|
776
|
+
# @!attribute [rw] documents
|
777
|
+
# A batch of documents formatted in JSON or HTML.
|
778
|
+
# @return [IO]
|
779
|
+
#
|
780
|
+
# @!attribute [rw] content_type
|
781
|
+
# The format of the batch you are uploading. Amazon CloudSearch
|
782
|
+
# supports two document batch formats:
|
783
|
+
#
|
784
|
+
# * application/json
|
785
|
+
# * application/xml
|
786
|
+
# @return [String]
|
787
|
+
#
|
788
|
+
class UploadDocumentsRequest < Struct.new(
|
789
|
+
:documents,
|
790
|
+
:content_type)
|
791
|
+
include Aws::Structure
|
792
|
+
end
|
786
793
|
|
794
|
+
# Contains the response to an `UploadDocuments` request.
|
795
|
+
#
|
796
|
+
# @!attribute [rw] status
|
797
|
+
# The status of an `UploadDocumentsRequest`.
|
798
|
+
# @return [String]
|
799
|
+
#
|
800
|
+
# @!attribute [rw] adds
|
801
|
+
# The number of documents that were added to the search domain.
|
802
|
+
# @return [Integer]
|
803
|
+
#
|
804
|
+
# @!attribute [rw] deletes
|
805
|
+
# The number of documents that were deleted from the search domain.
|
806
|
+
# @return [Integer]
|
807
|
+
#
|
808
|
+
# @!attribute [rw] warnings
|
809
|
+
# Any warnings returned by the document service about the documents
|
810
|
+
# being uploaded.
|
811
|
+
# @return [Array<Types::DocumentServiceWarning>]
|
812
|
+
#
|
813
|
+
class UploadDocumentsResponse < Struct.new(
|
814
|
+
:status,
|
815
|
+
:adds,
|
816
|
+
:deletes,
|
817
|
+
:warnings)
|
818
|
+
include Aws::Structure
|
787
819
|
end
|
820
|
+
|
788
821
|
end
|
789
822
|
end
|