aws-sdk-cloudsearchdomain 1.0.0.rc1
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 +7 -0
- data/lib/aws-sdk-cloudsearchdomain.rb +47 -0
- data/lib/aws-sdk-cloudsearchdomain/client.rb +712 -0
- data/lib/aws-sdk-cloudsearchdomain/client_api.rb +230 -0
- data/lib/aws-sdk-cloudsearchdomain/customizations.rb +7 -0
- data/lib/aws-sdk-cloudsearchdomain/errors.rb +23 -0
- data/lib/aws-sdk-cloudsearchdomain/plugins/conditional_signing.rb +48 -0
- data/lib/aws-sdk-cloudsearchdomain/resource.rb +25 -0
- data/lib/aws-sdk-cloudsearchdomain/types.rb +789 -0
- metadata +81 -0
@@ -0,0 +1,230 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws
|
9
|
+
module CloudSearchDomain
|
10
|
+
# @api private
|
11
|
+
module ClientApi
|
12
|
+
|
13
|
+
include Seahorse::Model
|
14
|
+
|
15
|
+
Adds = Shapes::IntegerShape.new(name: 'Adds')
|
16
|
+
Blob = Shapes::BlobShape.new(name: 'Blob')
|
17
|
+
Bucket = Shapes::StructureShape.new(name: 'Bucket')
|
18
|
+
BucketInfo = Shapes::StructureShape.new(name: 'BucketInfo')
|
19
|
+
BucketList = Shapes::ListShape.new(name: 'BucketList')
|
20
|
+
ContentType = Shapes::StringShape.new(name: 'ContentType')
|
21
|
+
Cursor = Shapes::StringShape.new(name: 'Cursor')
|
22
|
+
Deletes = Shapes::IntegerShape.new(name: 'Deletes')
|
23
|
+
DocumentServiceException = Shapes::StructureShape.new(name: 'DocumentServiceException')
|
24
|
+
DocumentServiceWarning = Shapes::StructureShape.new(name: 'DocumentServiceWarning')
|
25
|
+
DocumentServiceWarnings = Shapes::ListShape.new(name: 'DocumentServiceWarnings')
|
26
|
+
Double = Shapes::FloatShape.new(name: 'Double')
|
27
|
+
Expr = Shapes::StringShape.new(name: 'Expr')
|
28
|
+
Exprs = Shapes::MapShape.new(name: 'Exprs')
|
29
|
+
Facet = Shapes::StringShape.new(name: 'Facet')
|
30
|
+
Facets = Shapes::MapShape.new(name: 'Facets')
|
31
|
+
FieldStats = Shapes::StructureShape.new(name: 'FieldStats')
|
32
|
+
FieldValue = Shapes::ListShape.new(name: 'FieldValue')
|
33
|
+
Fields = Shapes::MapShape.new(name: 'Fields')
|
34
|
+
FilterQuery = Shapes::StringShape.new(name: 'FilterQuery')
|
35
|
+
Highlight = Shapes::StringShape.new(name: 'Highlight')
|
36
|
+
Highlights = Shapes::MapShape.new(name: 'Highlights')
|
37
|
+
Hit = Shapes::StructureShape.new(name: 'Hit')
|
38
|
+
HitList = Shapes::ListShape.new(name: 'HitList')
|
39
|
+
Hits = Shapes::StructureShape.new(name: 'Hits')
|
40
|
+
Long = Shapes::IntegerShape.new(name: 'Long')
|
41
|
+
Partial = Shapes::BooleanShape.new(name: 'Partial')
|
42
|
+
Query = Shapes::StringShape.new(name: 'Query')
|
43
|
+
QueryOptions = Shapes::StringShape.new(name: 'QueryOptions')
|
44
|
+
QueryParser = Shapes::StringShape.new(name: 'QueryParser')
|
45
|
+
Return = Shapes::StringShape.new(name: 'Return')
|
46
|
+
SearchException = Shapes::StructureShape.new(name: 'SearchException')
|
47
|
+
SearchRequest = Shapes::StructureShape.new(name: 'SearchRequest')
|
48
|
+
SearchResponse = Shapes::StructureShape.new(name: 'SearchResponse')
|
49
|
+
SearchStatus = Shapes::StructureShape.new(name: 'SearchStatus')
|
50
|
+
Size = Shapes::IntegerShape.new(name: 'Size')
|
51
|
+
Sort = Shapes::StringShape.new(name: 'Sort')
|
52
|
+
Start = Shapes::IntegerShape.new(name: 'Start')
|
53
|
+
Stat = Shapes::StringShape.new(name: 'Stat')
|
54
|
+
Stats = Shapes::MapShape.new(name: 'Stats')
|
55
|
+
String = Shapes::StringShape.new(name: 'String')
|
56
|
+
SuggestModel = Shapes::StructureShape.new(name: 'SuggestModel')
|
57
|
+
SuggestRequest = Shapes::StructureShape.new(name: 'SuggestRequest')
|
58
|
+
SuggestResponse = Shapes::StructureShape.new(name: 'SuggestResponse')
|
59
|
+
SuggestStatus = Shapes::StructureShape.new(name: 'SuggestStatus')
|
60
|
+
Suggester = Shapes::StringShape.new(name: 'Suggester')
|
61
|
+
SuggestionMatch = Shapes::StructureShape.new(name: 'SuggestionMatch')
|
62
|
+
Suggestions = Shapes::ListShape.new(name: 'Suggestions')
|
63
|
+
SuggestionsSize = Shapes::IntegerShape.new(name: 'SuggestionsSize')
|
64
|
+
UploadDocumentsRequest = Shapes::StructureShape.new(name: 'UploadDocumentsRequest')
|
65
|
+
UploadDocumentsResponse = Shapes::StructureShape.new(name: 'UploadDocumentsResponse')
|
66
|
+
|
67
|
+
Bucket.add_member(:value, Shapes::ShapeRef.new(shape: String, location_name: "value"))
|
68
|
+
Bucket.add_member(:count, Shapes::ShapeRef.new(shape: Long, location_name: "count"))
|
69
|
+
Bucket.struct_class = Types::Bucket
|
70
|
+
|
71
|
+
BucketInfo.add_member(:buckets, Shapes::ShapeRef.new(shape: BucketList, location_name: "buckets"))
|
72
|
+
BucketInfo.struct_class = Types::BucketInfo
|
73
|
+
|
74
|
+
BucketList.member = Shapes::ShapeRef.new(shape: Bucket)
|
75
|
+
|
76
|
+
DocumentServiceWarning.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "message"))
|
77
|
+
DocumentServiceWarning.struct_class = Types::DocumentServiceWarning
|
78
|
+
|
79
|
+
DocumentServiceWarnings.member = Shapes::ShapeRef.new(shape: DocumentServiceWarning)
|
80
|
+
|
81
|
+
Exprs.key = Shapes::ShapeRef.new(shape: String)
|
82
|
+
Exprs.value = Shapes::ShapeRef.new(shape: String)
|
83
|
+
|
84
|
+
Facets.key = Shapes::ShapeRef.new(shape: String)
|
85
|
+
Facets.value = Shapes::ShapeRef.new(shape: BucketInfo)
|
86
|
+
|
87
|
+
FieldStats.add_member(:min, Shapes::ShapeRef.new(shape: String, location_name: "min"))
|
88
|
+
FieldStats.add_member(:max, Shapes::ShapeRef.new(shape: String, location_name: "max"))
|
89
|
+
FieldStats.add_member(:count, Shapes::ShapeRef.new(shape: Long, location_name: "count"))
|
90
|
+
FieldStats.add_member(:missing, Shapes::ShapeRef.new(shape: Long, location_name: "missing"))
|
91
|
+
FieldStats.add_member(:sum, Shapes::ShapeRef.new(shape: Double, location_name: "sum"))
|
92
|
+
FieldStats.add_member(:sum_of_squares, Shapes::ShapeRef.new(shape: Double, location_name: "sumOfSquares"))
|
93
|
+
FieldStats.add_member(:mean, Shapes::ShapeRef.new(shape: String, location_name: "mean"))
|
94
|
+
FieldStats.add_member(:stddev, Shapes::ShapeRef.new(shape: Double, location_name: "stddev"))
|
95
|
+
FieldStats.struct_class = Types::FieldStats
|
96
|
+
|
97
|
+
FieldValue.member = Shapes::ShapeRef.new(shape: String)
|
98
|
+
|
99
|
+
Fields.key = Shapes::ShapeRef.new(shape: String)
|
100
|
+
Fields.value = Shapes::ShapeRef.new(shape: FieldValue)
|
101
|
+
|
102
|
+
Highlights.key = Shapes::ShapeRef.new(shape: String)
|
103
|
+
Highlights.value = Shapes::ShapeRef.new(shape: String)
|
104
|
+
|
105
|
+
Hit.add_member(:id, Shapes::ShapeRef.new(shape: String, location_name: "id"))
|
106
|
+
Hit.add_member(:fields, Shapes::ShapeRef.new(shape: Fields, location_name: "fields"))
|
107
|
+
Hit.add_member(:exprs, Shapes::ShapeRef.new(shape: Exprs, location_name: "exprs"))
|
108
|
+
Hit.add_member(:highlights, Shapes::ShapeRef.new(shape: Highlights, location_name: "highlights"))
|
109
|
+
Hit.struct_class = Types::Hit
|
110
|
+
|
111
|
+
HitList.member = Shapes::ShapeRef.new(shape: Hit)
|
112
|
+
|
113
|
+
Hits.add_member(:found, Shapes::ShapeRef.new(shape: Long, location_name: "found"))
|
114
|
+
Hits.add_member(:start, Shapes::ShapeRef.new(shape: Long, location_name: "start"))
|
115
|
+
Hits.add_member(:cursor, Shapes::ShapeRef.new(shape: String, location_name: "cursor"))
|
116
|
+
Hits.add_member(:hit, Shapes::ShapeRef.new(shape: HitList, location_name: "hit"))
|
117
|
+
Hits.struct_class = Types::Hits
|
118
|
+
|
119
|
+
SearchRequest.add_member(:cursor, Shapes::ShapeRef.new(shape: Cursor, location: "querystring", location_name: "cursor"))
|
120
|
+
SearchRequest.add_member(:expr, Shapes::ShapeRef.new(shape: Expr, location: "querystring", location_name: "expr"))
|
121
|
+
SearchRequest.add_member(:facet, Shapes::ShapeRef.new(shape: Facet, location: "querystring", location_name: "facet"))
|
122
|
+
SearchRequest.add_member(:filter_query, Shapes::ShapeRef.new(shape: FilterQuery, location: "querystring", location_name: "fq"))
|
123
|
+
SearchRequest.add_member(:highlight, Shapes::ShapeRef.new(shape: Highlight, location: "querystring", location_name: "highlight"))
|
124
|
+
SearchRequest.add_member(:partial, Shapes::ShapeRef.new(shape: Partial, location: "querystring", location_name: "partial"))
|
125
|
+
SearchRequest.add_member(:query, Shapes::ShapeRef.new(shape: Query, required: true, location: "querystring", location_name: "q"))
|
126
|
+
SearchRequest.add_member(:query_options, Shapes::ShapeRef.new(shape: QueryOptions, location: "querystring", location_name: "q.options"))
|
127
|
+
SearchRequest.add_member(:query_parser, Shapes::ShapeRef.new(shape: QueryParser, location: "querystring", location_name: "q.parser"))
|
128
|
+
SearchRequest.add_member(:return, Shapes::ShapeRef.new(shape: Return, location: "querystring", location_name: "return"))
|
129
|
+
SearchRequest.add_member(:size, Shapes::ShapeRef.new(shape: Size, location: "querystring", location_name: "size"))
|
130
|
+
SearchRequest.add_member(:sort, Shapes::ShapeRef.new(shape: Sort, location: "querystring", location_name: "sort"))
|
131
|
+
SearchRequest.add_member(:start, Shapes::ShapeRef.new(shape: Start, location: "querystring", location_name: "start"))
|
132
|
+
SearchRequest.add_member(:stats, Shapes::ShapeRef.new(shape: Stat, location: "querystring", location_name: "stats"))
|
133
|
+
SearchRequest.struct_class = Types::SearchRequest
|
134
|
+
|
135
|
+
SearchResponse.add_member(:status, Shapes::ShapeRef.new(shape: SearchStatus, location_name: "status"))
|
136
|
+
SearchResponse.add_member(:hits, Shapes::ShapeRef.new(shape: Hits, location_name: "hits"))
|
137
|
+
SearchResponse.add_member(:facets, Shapes::ShapeRef.new(shape: Facets, location_name: "facets"))
|
138
|
+
SearchResponse.add_member(:stats, Shapes::ShapeRef.new(shape: Stats, location_name: "stats"))
|
139
|
+
SearchResponse.struct_class = Types::SearchResponse
|
140
|
+
|
141
|
+
SearchStatus.add_member(:timems, Shapes::ShapeRef.new(shape: Long, location_name: "timems"))
|
142
|
+
SearchStatus.add_member(:rid, Shapes::ShapeRef.new(shape: String, location_name: "rid"))
|
143
|
+
SearchStatus.struct_class = Types::SearchStatus
|
144
|
+
|
145
|
+
Stats.key = Shapes::ShapeRef.new(shape: String)
|
146
|
+
Stats.value = Shapes::ShapeRef.new(shape: FieldStats)
|
147
|
+
|
148
|
+
SuggestModel.add_member(:query, Shapes::ShapeRef.new(shape: String, location_name: "query"))
|
149
|
+
SuggestModel.add_member(:found, Shapes::ShapeRef.new(shape: Long, location_name: "found"))
|
150
|
+
SuggestModel.add_member(:suggestions, Shapes::ShapeRef.new(shape: Suggestions, location_name: "suggestions"))
|
151
|
+
SuggestModel.struct_class = Types::SuggestModel
|
152
|
+
|
153
|
+
SuggestRequest.add_member(:query, Shapes::ShapeRef.new(shape: Query, required: true, location: "querystring", location_name: "q"))
|
154
|
+
SuggestRequest.add_member(:suggester, Shapes::ShapeRef.new(shape: Suggester, required: true, location: "querystring", location_name: "suggester"))
|
155
|
+
SuggestRequest.add_member(:size, Shapes::ShapeRef.new(shape: SuggestionsSize, location: "querystring", location_name: "size"))
|
156
|
+
SuggestRequest.struct_class = Types::SuggestRequest
|
157
|
+
|
158
|
+
SuggestResponse.add_member(:status, Shapes::ShapeRef.new(shape: SuggestStatus, location_name: "status"))
|
159
|
+
SuggestResponse.add_member(:suggest, Shapes::ShapeRef.new(shape: SuggestModel, location_name: "suggest"))
|
160
|
+
SuggestResponse.struct_class = Types::SuggestResponse
|
161
|
+
|
162
|
+
SuggestStatus.add_member(:timems, Shapes::ShapeRef.new(shape: Long, location_name: "timems"))
|
163
|
+
SuggestStatus.add_member(:rid, Shapes::ShapeRef.new(shape: String, location_name: "rid"))
|
164
|
+
SuggestStatus.struct_class = Types::SuggestStatus
|
165
|
+
|
166
|
+
SuggestionMatch.add_member(:suggestion, Shapes::ShapeRef.new(shape: String, location_name: "suggestion"))
|
167
|
+
SuggestionMatch.add_member(:score, Shapes::ShapeRef.new(shape: Long, location_name: "score"))
|
168
|
+
SuggestionMatch.add_member(:id, Shapes::ShapeRef.new(shape: String, location_name: "id"))
|
169
|
+
SuggestionMatch.struct_class = Types::SuggestionMatch
|
170
|
+
|
171
|
+
Suggestions.member = Shapes::ShapeRef.new(shape: SuggestionMatch)
|
172
|
+
|
173
|
+
UploadDocumentsRequest.add_member(:documents, Shapes::ShapeRef.new(shape: Blob, required: true, location_name: "documents"))
|
174
|
+
UploadDocumentsRequest.add_member(:content_type, Shapes::ShapeRef.new(shape: ContentType, required: true, location: "header", location_name: "Content-Type"))
|
175
|
+
UploadDocumentsRequest.struct_class = Types::UploadDocumentsRequest
|
176
|
+
UploadDocumentsRequest[:payload] = :documents
|
177
|
+
UploadDocumentsRequest[:payload_member] = UploadDocumentsRequest.member(:documents)
|
178
|
+
|
179
|
+
UploadDocumentsResponse.add_member(:status, Shapes::ShapeRef.new(shape: String, location_name: "status"))
|
180
|
+
UploadDocumentsResponse.add_member(:adds, Shapes::ShapeRef.new(shape: Adds, location_name: "adds"))
|
181
|
+
UploadDocumentsResponse.add_member(:deletes, Shapes::ShapeRef.new(shape: Deletes, location_name: "deletes"))
|
182
|
+
UploadDocumentsResponse.add_member(:warnings, Shapes::ShapeRef.new(shape: DocumentServiceWarnings, location_name: "warnings"))
|
183
|
+
UploadDocumentsResponse.struct_class = Types::UploadDocumentsResponse
|
184
|
+
|
185
|
+
|
186
|
+
# @api private
|
187
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
188
|
+
|
189
|
+
api.version = "2013-01-01"
|
190
|
+
|
191
|
+
api.metadata = {
|
192
|
+
"endpointPrefix" => "cloudsearchdomain",
|
193
|
+
"jsonVersion" => "1.1",
|
194
|
+
"protocol" => "rest-json",
|
195
|
+
"serviceFullName" => "Amazon CloudSearch Domain",
|
196
|
+
"signatureVersion" => "v4",
|
197
|
+
"signingName" => "cloudsearch",
|
198
|
+
}
|
199
|
+
|
200
|
+
api.add_operation(:search, Seahorse::Model::Operation.new.tap do |o|
|
201
|
+
o.name = "Search"
|
202
|
+
o.http_method = "GET"
|
203
|
+
o.http_request_uri = "/2013-01-01/search?format=sdk&pretty=true"
|
204
|
+
o.input = Shapes::ShapeRef.new(shape: SearchRequest)
|
205
|
+
o.output = Shapes::ShapeRef.new(shape: SearchResponse)
|
206
|
+
o.errors << Shapes::ShapeRef.new(shape: SearchException)
|
207
|
+
end)
|
208
|
+
|
209
|
+
api.add_operation(:suggest, Seahorse::Model::Operation.new.tap do |o|
|
210
|
+
o.name = "Suggest"
|
211
|
+
o.http_method = "GET"
|
212
|
+
o.http_request_uri = "/2013-01-01/suggest?format=sdk&pretty=true"
|
213
|
+
o.input = Shapes::ShapeRef.new(shape: SuggestRequest)
|
214
|
+
o.output = Shapes::ShapeRef.new(shape: SuggestResponse)
|
215
|
+
o.errors << Shapes::ShapeRef.new(shape: SearchException)
|
216
|
+
end)
|
217
|
+
|
218
|
+
api.add_operation(:upload_documents, Seahorse::Model::Operation.new.tap do |o|
|
219
|
+
o.name = "UploadDocuments"
|
220
|
+
o.http_method = "POST"
|
221
|
+
o.http_request_uri = "/2013-01-01/documents/batch?format=sdk"
|
222
|
+
o.input = Shapes::ShapeRef.new(shape: UploadDocumentsRequest)
|
223
|
+
o.output = Shapes::ShapeRef.new(shape: UploadDocumentsResponse)
|
224
|
+
o.errors << Shapes::ShapeRef.new(shape: DocumentServiceException)
|
225
|
+
end)
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws
|
9
|
+
module CloudSearchDomain
|
10
|
+
module Errors
|
11
|
+
|
12
|
+
extend Aws::Errors::DynamicErrors
|
13
|
+
|
14
|
+
# Raised when calling #load or #data on a resource class that can not be
|
15
|
+
# loaded. This can happen when:
|
16
|
+
#
|
17
|
+
# * A resource class has identifiers, but no data attributes.
|
18
|
+
# * Resource data is only available when making an API call that
|
19
|
+
# enumerates all resources of that type.
|
20
|
+
class ResourceNotLoadable < RuntimeError; end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'aws-sigv4'
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module CloudSearchDomain
|
5
|
+
module Plugins
|
6
|
+
|
7
|
+
# Makes it possible to conditional sign {Aws::CloudSearchDomain::Client}
|
8
|
+
# requests. When credentials are configured, requests are signed.
|
9
|
+
# When they are omitted, the request is sent anonymously.
|
10
|
+
class ConditionalSigning < Seahorse::Client::Plugin
|
11
|
+
|
12
|
+
# The Aws::CloudSearchDomain::Client is configured with a null
|
13
|
+
# signer when the credentials are `nil` or simply not set.
|
14
|
+
# @api private
|
15
|
+
class NullSigner
|
16
|
+
def initialize(*args); end
|
17
|
+
def sign_request(*args)
|
18
|
+
Aws::Sigv4::Signature.new(headers: {})
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# Adding region as an option to avoid an issue when `Aws.config[:region]`
|
23
|
+
# is populated and the global configuration plugin merges options onto
|
24
|
+
# this client.
|
25
|
+
option(:region)
|
26
|
+
|
27
|
+
option(:sigv4_region, doc_type: String, docstring: <<-DOCS) do |cfg|
|
28
|
+
Only needed when sending authenticated/signed requests to a Cloud
|
29
|
+
Search domain and the endpoint does not contain the region name.
|
30
|
+
DOCS
|
31
|
+
# extract the region name from the cloud search domain endpoint
|
32
|
+
if cfg.endpoint
|
33
|
+
cfg.endpoint.to_s.split('.')[1]
|
34
|
+
else
|
35
|
+
raise ArgumentError, 'missing required option :endpoint'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
option(:sigv4_signer) do |cfg|
|
40
|
+
if cfg.credentials.nil? || !cfg.credentials.set?
|
41
|
+
NullSigner.new
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws
|
9
|
+
module CloudSearchDomain
|
10
|
+
class Resource
|
11
|
+
|
12
|
+
# @param options ({})
|
13
|
+
# @option options [Client] :client
|
14
|
+
def initialize(options = {})
|
15
|
+
@client = options[:client] || Client.new(options)
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [Client]
|
19
|
+
def client
|
20
|
+
@client
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,789 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws
|
9
|
+
module CloudSearchDomain
|
10
|
+
module Types
|
11
|
+
|
12
|
+
# A container for facet information.
|
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
|
+
class Bucket < Struct.new(
|
22
|
+
:value,
|
23
|
+
:count)
|
24
|
+
include Aws::Structure
|
25
|
+
end
|
26
|
+
|
27
|
+
# A container for the calculated facet values and counts.
|
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
|
35
|
+
|
36
|
+
# A warning returned by the document service when an issue is discovered
|
37
|
+
# while processing an upload request.
|
38
|
+
# @!attribute [rw] message
|
39
|
+
# The description for a warning returned by the document service.
|
40
|
+
# @return [String]
|
41
|
+
class DocumentServiceWarning < Struct.new(
|
42
|
+
:message)
|
43
|
+
include Aws::Structure
|
44
|
+
end
|
45
|
+
|
46
|
+
# The statistics for a field calculated in the request.
|
47
|
+
# @!attribute [rw] min
|
48
|
+
# The minimum value found in the specified field in the result set.
|
49
|
+
#
|
50
|
+
# If the field is numeric (`int`, `int-array`, `double`, or
|
51
|
+
# `double-array`), `min` is the string representation of a
|
52
|
+
# double-precision 64-bit floating point value. If the field is `date`
|
53
|
+
# or `date-array`, `min` is the string representation of a date with
|
54
|
+
# the format specified in [IETF RFC3339][1]\:
|
55
|
+
# yyyy-mm-ddTHH:mm:ss.SSSZ.
|
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
|
127
|
+
|
128
|
+
# Information about a document that matches the search request.
|
129
|
+
# @!attribute [rw] id
|
130
|
+
# The document ID of a document that matches the search request.
|
131
|
+
# @return [String]
|
132
|
+
#
|
133
|
+
# @!attribute [rw] fields
|
134
|
+
# The fields returned from a document that matches the search request.
|
135
|
+
# @return [Hash<String,Array<String>>]
|
136
|
+
#
|
137
|
+
# @!attribute [rw] exprs
|
138
|
+
# The expressions returned from a document that matches the search
|
139
|
+
# request.
|
140
|
+
# @return [Hash<String,String>]
|
141
|
+
#
|
142
|
+
# @!attribute [rw] highlights
|
143
|
+
# The highlights returned from a document that matches the search
|
144
|
+
# request.
|
145
|
+
# @return [Hash<String,String>]
|
146
|
+
class Hit < Struct.new(
|
147
|
+
:id,
|
148
|
+
:fields,
|
149
|
+
:exprs,
|
150
|
+
:highlights)
|
151
|
+
include Aws::Structure
|
152
|
+
end
|
153
|
+
|
154
|
+
# The collection of documents that match the search request.
|
155
|
+
# @!attribute [rw] found
|
156
|
+
# The total number of documents that match the search request.
|
157
|
+
# @return [Integer]
|
158
|
+
#
|
159
|
+
# @!attribute [rw] start
|
160
|
+
# The index of the first matching document.
|
161
|
+
# @return [Integer]
|
162
|
+
#
|
163
|
+
# @!attribute [rw] cursor
|
164
|
+
# A cursor that can be used to retrieve the next set of matching
|
165
|
+
# documents when you want to page through a large result set.
|
166
|
+
# @return [String]
|
167
|
+
#
|
168
|
+
# @!attribute [rw] hit
|
169
|
+
# A document that matches the search request.
|
170
|
+
# @return [Array<Types::Hit>]
|
171
|
+
class Hits < Struct.new(
|
172
|
+
:found,
|
173
|
+
:start,
|
174
|
+
:cursor,
|
175
|
+
:hit)
|
176
|
+
include Aws::Structure
|
177
|
+
end
|
178
|
+
|
179
|
+
# Container for the parameters to the `Search` request.
|
180
|
+
# @note When making an API call, pass SearchRequest
|
181
|
+
# data as a hash:
|
182
|
+
#
|
183
|
+
# {
|
184
|
+
# cursor: "Cursor",
|
185
|
+
# expr: "Expr",
|
186
|
+
# facet: "Facet",
|
187
|
+
# filter_query: "FilterQuery",
|
188
|
+
# highlight: "Highlight",
|
189
|
+
# partial: false,
|
190
|
+
# query: "Query", # required
|
191
|
+
# query_options: "QueryOptions",
|
192
|
+
# query_parser: "simple", # accepts simple, structured, lucene, dismax
|
193
|
+
# return: "Return",
|
194
|
+
# size: 1,
|
195
|
+
# sort: "Sort",
|
196
|
+
# start: 1,
|
197
|
+
# stats: "Stat",
|
198
|
+
# }
|
199
|
+
# @!attribute [rw] cursor
|
200
|
+
# Retrieves a cursor value you can use to page through large result
|
201
|
+
# sets. Use the `size` parameter to control the number of hits to
|
202
|
+
# include in each response. You can specify either the `cursor` or
|
203
|
+
# `start` parameter in a request; they are mutually exclusive. To get
|
204
|
+
# the first cursor, set the cursor value to `initial`. In subsequent
|
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
|
596
|
+
|
597
|
+
# The result of a `Search` request. Contains the documents that match
|
598
|
+
# the specified search criteria and any requested fields, highlights,
|
599
|
+
# and facet information.
|
600
|
+
# @!attribute [rw] status
|
601
|
+
# The status information returned for the search request.
|
602
|
+
# @return [Types::SearchStatus]
|
603
|
+
#
|
604
|
+
# @!attribute [rw] hits
|
605
|
+
# The documents that match the search criteria.
|
606
|
+
# @return [Types::Hits]
|
607
|
+
#
|
608
|
+
# @!attribute [rw] facets
|
609
|
+
# The requested facet information.
|
610
|
+
# @return [Hash<String,Types::BucketInfo>]
|
611
|
+
#
|
612
|
+
# @!attribute [rw] stats
|
613
|
+
# The requested field statistics information.
|
614
|
+
# @return [Hash<String,Types::FieldStats>]
|
615
|
+
class SearchResponse < Struct.new(
|
616
|
+
:status,
|
617
|
+
:hits,
|
618
|
+
:facets,
|
619
|
+
:stats)
|
620
|
+
include Aws::Structure
|
621
|
+
end
|
622
|
+
|
623
|
+
# Contains the resource id (`rid`) and the time it took to process the
|
624
|
+
# request (`timems`).
|
625
|
+
# @!attribute [rw] timems
|
626
|
+
# How long it took to process the request, in milliseconds.
|
627
|
+
# @return [Integer]
|
628
|
+
#
|
629
|
+
# @!attribute [rw] rid
|
630
|
+
# The encrypted resource ID for the request.
|
631
|
+
# @return [String]
|
632
|
+
class SearchStatus < Struct.new(
|
633
|
+
:timems,
|
634
|
+
:rid)
|
635
|
+
include Aws::Structure
|
636
|
+
end
|
637
|
+
|
638
|
+
# Container for the suggestion information returned in a
|
639
|
+
# `SuggestResponse`.
|
640
|
+
# @!attribute [rw] query
|
641
|
+
# The query string specified in the suggest request.
|
642
|
+
# @return [String]
|
643
|
+
#
|
644
|
+
# @!attribute [rw] found
|
645
|
+
# The number of documents that were found to match the query string.
|
646
|
+
# @return [Integer]
|
647
|
+
#
|
648
|
+
# @!attribute [rw] suggestions
|
649
|
+
# The documents that match the query string.
|
650
|
+
# @return [Array<Types::SuggestionMatch>]
|
651
|
+
class SuggestModel < Struct.new(
|
652
|
+
:query,
|
653
|
+
:found,
|
654
|
+
:suggestions)
|
655
|
+
include Aws::Structure
|
656
|
+
end
|
657
|
+
|
658
|
+
# Container for the parameters to the `Suggest` request.
|
659
|
+
# @note When making an API call, pass SuggestRequest
|
660
|
+
# data as a hash:
|
661
|
+
#
|
662
|
+
# {
|
663
|
+
# query: "Query", # required
|
664
|
+
# suggester: "Suggester", # required
|
665
|
+
# size: 1,
|
666
|
+
# }
|
667
|
+
# @!attribute [rw] query
|
668
|
+
# Specifies the string for which you want to get suggestions.
|
669
|
+
# @return [String]
|
670
|
+
#
|
671
|
+
# @!attribute [rw] suggester
|
672
|
+
# Specifies the name of the suggester to use to find suggested
|
673
|
+
# matches.
|
674
|
+
# @return [String]
|
675
|
+
#
|
676
|
+
# @!attribute [rw] size
|
677
|
+
# Specifies the maximum number of suggestions to return.
|
678
|
+
# @return [Integer]
|
679
|
+
class SuggestRequest < Struct.new(
|
680
|
+
:query,
|
681
|
+
:suggester,
|
682
|
+
:size)
|
683
|
+
include Aws::Structure
|
684
|
+
end
|
685
|
+
|
686
|
+
# Contains the response to a `Suggest` request.
|
687
|
+
# @!attribute [rw] status
|
688
|
+
# The status of a `SuggestRequest`. Contains the resource ID (`rid`)
|
689
|
+
# and how long it took to process the request (`timems`).
|
690
|
+
# @return [Types::SuggestStatus]
|
691
|
+
#
|
692
|
+
# @!attribute [rw] suggest
|
693
|
+
# Container for the matching search suggestion information.
|
694
|
+
# @return [Types::SuggestModel]
|
695
|
+
class SuggestResponse < Struct.new(
|
696
|
+
:status,
|
697
|
+
:suggest)
|
698
|
+
include Aws::Structure
|
699
|
+
end
|
700
|
+
|
701
|
+
# Contains the resource id (`rid`) and the time it took to process the
|
702
|
+
# request (`timems`).
|
703
|
+
# @!attribute [rw] timems
|
704
|
+
# How long it took to process the request, in milliseconds.
|
705
|
+
# @return [Integer]
|
706
|
+
#
|
707
|
+
# @!attribute [rw] rid
|
708
|
+
# The encrypted resource ID for the request.
|
709
|
+
# @return [String]
|
710
|
+
class SuggestStatus < Struct.new(
|
711
|
+
:timems,
|
712
|
+
:rid)
|
713
|
+
include Aws::Structure
|
714
|
+
end
|
715
|
+
|
716
|
+
# An autocomplete suggestion that matches the query string specified in
|
717
|
+
# a `SuggestRequest`.
|
718
|
+
# @!attribute [rw] suggestion
|
719
|
+
# The string that matches the query string specified in the
|
720
|
+
# `SuggestRequest`.
|
721
|
+
# @return [String]
|
722
|
+
#
|
723
|
+
# @!attribute [rw] score
|
724
|
+
# The relevance score of a suggested match.
|
725
|
+
# @return [Integer]
|
726
|
+
#
|
727
|
+
# @!attribute [rw] id
|
728
|
+
# The document ID of the suggested document.
|
729
|
+
# @return [String]
|
730
|
+
class SuggestionMatch < Struct.new(
|
731
|
+
:suggestion,
|
732
|
+
:score,
|
733
|
+
:id)
|
734
|
+
include Aws::Structure
|
735
|
+
end
|
736
|
+
|
737
|
+
# Container for the parameters to the `UploadDocuments` request.
|
738
|
+
# @note When making an API call, pass UploadDocumentsRequest
|
739
|
+
# data as a hash:
|
740
|
+
#
|
741
|
+
# {
|
742
|
+
# documents: "data", # required
|
743
|
+
# content_type: "application/json", # required, accepts application/json, application/xml
|
744
|
+
# }
|
745
|
+
# @!attribute [rw] documents
|
746
|
+
# A batch of documents formatted in JSON or HTML.
|
747
|
+
# @return [IO]
|
748
|
+
#
|
749
|
+
# @!attribute [rw] content_type
|
750
|
+
# The format of the batch you are uploading. Amazon CloudSearch
|
751
|
+
# supports two document batch formats:
|
752
|
+
#
|
753
|
+
# * application/json
|
754
|
+
# * application/xml
|
755
|
+
# @return [String]
|
756
|
+
class UploadDocumentsRequest < Struct.new(
|
757
|
+
:documents,
|
758
|
+
:content_type)
|
759
|
+
include Aws::Structure
|
760
|
+
end
|
761
|
+
|
762
|
+
# Contains the response to an `UploadDocuments` request.
|
763
|
+
# @!attribute [rw] status
|
764
|
+
# The status of an `UploadDocumentsRequest`.
|
765
|
+
# @return [String]
|
766
|
+
#
|
767
|
+
# @!attribute [rw] adds
|
768
|
+
# The number of documents that were added to the search domain.
|
769
|
+
# @return [Integer]
|
770
|
+
#
|
771
|
+
# @!attribute [rw] deletes
|
772
|
+
# The number of documents that were deleted from the search domain.
|
773
|
+
# @return [Integer]
|
774
|
+
#
|
775
|
+
# @!attribute [rw] warnings
|
776
|
+
# Any warnings returned by the document service about the documents
|
777
|
+
# being uploaded.
|
778
|
+
# @return [Array<Types::DocumentServiceWarning>]
|
779
|
+
class UploadDocumentsResponse < Struct.new(
|
780
|
+
:status,
|
781
|
+
:adds,
|
782
|
+
:deletes,
|
783
|
+
:warnings)
|
784
|
+
include Aws::Structure
|
785
|
+
end
|
786
|
+
|
787
|
+
end
|
788
|
+
end
|
789
|
+
end
|