1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package cloudsearchdomain
4
5import (
6	"io"
7
8	"github.com/aws/aws-sdk-go/aws"
9	"github.com/aws/aws-sdk-go/aws/awsutil"
10	"github.com/aws/aws-sdk-go/aws/request"
11)
12
13const opSearch = "Search"
14
15// SearchRequest generates a "aws/request.Request" representing the
16// client's request for the Search operation. The "output" return
17// value will be populated with the request's response once the request complets
18// successfuly.
19//
20// Use "Send" method on the returned Request to send the API call to the service.
21// the "output" return value is not valid until after Send returns without error.
22//
23// See Search for more information on using the Search
24// API call, and error handling.
25//
26// This method is useful when you want to inject custom logic or configuration
27// into the SDK's request lifecycle. Such as custom headers, or retry logic.
28//
29//
30//    // Example sending a request using the SearchRequest method.
31//    req, resp := client.SearchRequest(params)
32//
33//    err := req.Send()
34//    if err == nil { // resp is now filled
35//        fmt.Println(resp)
36//    }
37func (c *CloudSearchDomain) SearchRequest(input *SearchInput) (req *request.Request, output *SearchOutput) {
38	op := &request.Operation{
39		Name:       opSearch,
40		HTTPMethod: "GET",
41		HTTPPath:   "/2013-01-01/search?format=sdk&pretty=true",
42	}
43
44	if input == nil {
45		input = &SearchInput{}
46	}
47
48	output = &SearchOutput{}
49	req = c.newRequest(op, input, output)
50	return
51}
52
53// Search API operation for Amazon CloudSearch Domain.
54//
55// Retrieves a list of documents that match the specified search criteria. How
56// you specify the search criteria depends on which query parser you use. Amazon
57// CloudSearch supports four query parsers:
58//
59//    * simple: search all text and text-array fields for the specified string.
60//    Search for phrases, individual terms, and prefixes.
61//    * structured: search specific fields, construct compound queries using
62//    Boolean operators, and use advanced features such as term boosting and
63//    proximity searching.
64//    * lucene: specify search criteria using the Apache Lucene query parser
65//    syntax.
66//    * dismax: specify search criteria using the simplified subset of the Apache
67//    Lucene query parser syntax defined by the DisMax query parser.
68// For more information, see Searching Your Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html)
69// in the Amazon CloudSearch Developer Guide.
70//
71// The endpoint for submitting Search requests is domain-specific. You submit
72// search requests to a domain's search endpoint. To get the search endpoint
73// for your domain, use the Amazon CloudSearch configuration service DescribeDomains
74// action. A domain's endpoints are also displayed on the domain dashboard in
75// the Amazon CloudSearch console.
76//
77// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
78// with awserr.Error's Code and Message methods to get detailed information about
79// the error.
80//
81// See the AWS API reference guide for Amazon CloudSearch Domain's
82// API operation Search for usage and error information.
83//
84// Returned Error Codes:
85//   * ErrCodeSearchException "SearchException"
86//   Information about any problems encountered while processing a search request.
87//
88func (c *CloudSearchDomain) Search(input *SearchInput) (*SearchOutput, error) {
89	req, out := c.SearchRequest(input)
90	return out, req.Send()
91}
92
93// SearchWithContext is the same as Search with the addition of
94// the ability to pass a context and additional request options.
95//
96// See Search for details on how to use this API operation.
97//
98// The context must be non-nil and will be used for request cancellation. If
99// the context is nil a panic will occur. In the future the SDK may create
100// sub-contexts for http.Requests. See https://golang.org/pkg/context/
101// for more information on using Contexts.
102func (c *CloudSearchDomain) SearchWithContext(ctx aws.Context, input *SearchInput, opts ...request.Option) (*SearchOutput, error) {
103	req, out := c.SearchRequest(input)
104	req.SetContext(ctx)
105	req.ApplyOptions(opts...)
106	return out, req.Send()
107}
108
109const opSuggest = "Suggest"
110
111// SuggestRequest generates a "aws/request.Request" representing the
112// client's request for the Suggest operation. The "output" return
113// value will be populated with the request's response once the request complets
114// successfuly.
115//
116// Use "Send" method on the returned Request to send the API call to the service.
117// the "output" return value is not valid until after Send returns without error.
118//
119// See Suggest for more information on using the Suggest
120// API call, and error handling.
121//
122// This method is useful when you want to inject custom logic or configuration
123// into the SDK's request lifecycle. Such as custom headers, or retry logic.
124//
125//
126//    // Example sending a request using the SuggestRequest method.
127//    req, resp := client.SuggestRequest(params)
128//
129//    err := req.Send()
130//    if err == nil { // resp is now filled
131//        fmt.Println(resp)
132//    }
133func (c *CloudSearchDomain) SuggestRequest(input *SuggestInput) (req *request.Request, output *SuggestOutput) {
134	op := &request.Operation{
135		Name:       opSuggest,
136		HTTPMethod: "GET",
137		HTTPPath:   "/2013-01-01/suggest?format=sdk&pretty=true",
138	}
139
140	if input == nil {
141		input = &SuggestInput{}
142	}
143
144	output = &SuggestOutput{}
145	req = c.newRequest(op, input, output)
146	return
147}
148
149// Suggest API operation for Amazon CloudSearch Domain.
150//
151// Retrieves autocomplete suggestions for a partial query string. You can use
152// suggestions enable you to display likely matches before users finish typing.
153// In Amazon CloudSearch, suggestions are based on the contents of a particular
154// text field. When you request suggestions, Amazon CloudSearch finds all of
155// the documents whose values in the suggester field start with the specified
156// query string. The beginning of the field must match the query string to be
157// considered a match.
158//
159// For more information about configuring suggesters and retrieving suggestions,
160// see Getting Suggestions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html)
161// in the Amazon CloudSearch Developer Guide.
162//
163// The endpoint for submitting Suggest requests is domain-specific. You submit
164// suggest requests to a domain's search endpoint. To get the search endpoint
165// for your domain, use the Amazon CloudSearch configuration service DescribeDomains
166// action. A domain's endpoints are also displayed on the domain dashboard in
167// the Amazon CloudSearch console.
168//
169// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
170// with awserr.Error's Code and Message methods to get detailed information about
171// the error.
172//
173// See the AWS API reference guide for Amazon CloudSearch Domain's
174// API operation Suggest for usage and error information.
175//
176// Returned Error Codes:
177//   * ErrCodeSearchException "SearchException"
178//   Information about any problems encountered while processing a search request.
179//
180func (c *CloudSearchDomain) Suggest(input *SuggestInput) (*SuggestOutput, error) {
181	req, out := c.SuggestRequest(input)
182	return out, req.Send()
183}
184
185// SuggestWithContext is the same as Suggest with the addition of
186// the ability to pass a context and additional request options.
187//
188// See Suggest for details on how to use this API operation.
189//
190// The context must be non-nil and will be used for request cancellation. If
191// the context is nil a panic will occur. In the future the SDK may create
192// sub-contexts for http.Requests. See https://golang.org/pkg/context/
193// for more information on using Contexts.
194func (c *CloudSearchDomain) SuggestWithContext(ctx aws.Context, input *SuggestInput, opts ...request.Option) (*SuggestOutput, error) {
195	req, out := c.SuggestRequest(input)
196	req.SetContext(ctx)
197	req.ApplyOptions(opts...)
198	return out, req.Send()
199}
200
201const opUploadDocuments = "UploadDocuments"
202
203// UploadDocumentsRequest generates a "aws/request.Request" representing the
204// client's request for the UploadDocuments operation. The "output" return
205// value will be populated with the request's response once the request complets
206// successfuly.
207//
208// Use "Send" method on the returned Request to send the API call to the service.
209// the "output" return value is not valid until after Send returns without error.
210//
211// See UploadDocuments for more information on using the UploadDocuments
212// API call, and error handling.
213//
214// This method is useful when you want to inject custom logic or configuration
215// into the SDK's request lifecycle. Such as custom headers, or retry logic.
216//
217//
218//    // Example sending a request using the UploadDocumentsRequest method.
219//    req, resp := client.UploadDocumentsRequest(params)
220//
221//    err := req.Send()
222//    if err == nil { // resp is now filled
223//        fmt.Println(resp)
224//    }
225func (c *CloudSearchDomain) UploadDocumentsRequest(input *UploadDocumentsInput) (req *request.Request, output *UploadDocumentsOutput) {
226	op := &request.Operation{
227		Name:       opUploadDocuments,
228		HTTPMethod: "POST",
229		HTTPPath:   "/2013-01-01/documents/batch?format=sdk",
230	}
231
232	if input == nil {
233		input = &UploadDocumentsInput{}
234	}
235
236	output = &UploadDocumentsOutput{}
237	req = c.newRequest(op, input, output)
238	return
239}
240
241// UploadDocuments API operation for Amazon CloudSearch Domain.
242//
243// Posts a batch of documents to a search domain for indexing. A document batch
244// is a collection of add and delete operations that represent the documents
245// you want to add, update, or delete from your domain. Batches can be described
246// in either JSON or XML. Each item that you want Amazon CloudSearch to return
247// as a search result (such as a product) is represented as a document. Every
248// document has a unique ID and one or more fields that contain the data that
249// you want to search and return in results. Individual documents cannot contain
250// more than 1 MB of data. The entire batch cannot exceed 5 MB. To get the best
251// possible upload performance, group add and delete operations in batches that
252// are close the 5 MB limit. Submitting a large volume of single-document batches
253// can overload a domain's document service.
254//
255// The endpoint for submitting UploadDocuments requests is domain-specific.
256// To get the document endpoint for your domain, use the Amazon CloudSearch
257// configuration service DescribeDomains action. A domain's endpoints are also
258// displayed on the domain dashboard in the Amazon CloudSearch console.
259//
260// For more information about formatting your data for Amazon CloudSearch, see
261// Preparing Your Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/preparing-data.html)
262// in the Amazon CloudSearch Developer Guide. For more information about uploading
263// data for indexing, see Uploading Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html)
264// in the Amazon CloudSearch Developer Guide.
265//
266// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
267// with awserr.Error's Code and Message methods to get detailed information about
268// the error.
269//
270// See the AWS API reference guide for Amazon CloudSearch Domain's
271// API operation UploadDocuments for usage and error information.
272//
273// Returned Error Codes:
274//   * ErrCodeDocumentServiceException "DocumentServiceException"
275//   Information about any problems encountered while processing an upload request.
276//
277func (c *CloudSearchDomain) UploadDocuments(input *UploadDocumentsInput) (*UploadDocumentsOutput, error) {
278	req, out := c.UploadDocumentsRequest(input)
279	return out, req.Send()
280}
281
282// UploadDocumentsWithContext is the same as UploadDocuments with the addition of
283// the ability to pass a context and additional request options.
284//
285// See UploadDocuments for details on how to use this API operation.
286//
287// The context must be non-nil and will be used for request cancellation. If
288// the context is nil a panic will occur. In the future the SDK may create
289// sub-contexts for http.Requests. See https://golang.org/pkg/context/
290// for more information on using Contexts.
291func (c *CloudSearchDomain) UploadDocumentsWithContext(ctx aws.Context, input *UploadDocumentsInput, opts ...request.Option) (*UploadDocumentsOutput, error) {
292	req, out := c.UploadDocumentsRequest(input)
293	req.SetContext(ctx)
294	req.ApplyOptions(opts...)
295	return out, req.Send()
296}
297
298// A container for facet information.
299type Bucket struct {
300	_ struct{} `type:"structure"`
301
302	// The number of hits that contain the facet value in the specified facet field.
303	Count *int64 `locationName:"count" type:"long"`
304
305	// The facet value being counted.
306	Value *string `locationName:"value" type:"string"`
307}
308
309// String returns the string representation
310func (s Bucket) String() string {
311	return awsutil.Prettify(s)
312}
313
314// GoString returns the string representation
315func (s Bucket) GoString() string {
316	return s.String()
317}
318
319// SetCount sets the Count field's value.
320func (s *Bucket) SetCount(v int64) *Bucket {
321	s.Count = &v
322	return s
323}
324
325// SetValue sets the Value field's value.
326func (s *Bucket) SetValue(v string) *Bucket {
327	s.Value = &v
328	return s
329}
330
331// A container for the calculated facet values and counts.
332type BucketInfo struct {
333	_ struct{} `type:"structure"`
334
335	// A list of the calculated facet values and counts.
336	Buckets []*Bucket `locationName:"buckets" type:"list"`
337}
338
339// String returns the string representation
340func (s BucketInfo) String() string {
341	return awsutil.Prettify(s)
342}
343
344// GoString returns the string representation
345func (s BucketInfo) GoString() string {
346	return s.String()
347}
348
349// SetBuckets sets the Buckets field's value.
350func (s *BucketInfo) SetBuckets(v []*Bucket) *BucketInfo {
351	s.Buckets = v
352	return s
353}
354
355// A warning returned by the document service when an issue is discovered while
356// processing an upload request.
357type DocumentServiceWarning struct {
358	_ struct{} `type:"structure"`
359
360	// The description for a warning returned by the document service.
361	Message *string `locationName:"message" type:"string"`
362}
363
364// String returns the string representation
365func (s DocumentServiceWarning) String() string {
366	return awsutil.Prettify(s)
367}
368
369// GoString returns the string representation
370func (s DocumentServiceWarning) GoString() string {
371	return s.String()
372}
373
374// SetMessage sets the Message field's value.
375func (s *DocumentServiceWarning) SetMessage(v string) *DocumentServiceWarning {
376	s.Message = &v
377	return s
378}
379
380// The statistics for a field calculated in the request.
381type FieldStats struct {
382	_ struct{} `type:"structure"`
383
384	// The number of documents that contain a value in the specified field in the
385	// result set.
386	Count *int64 `locationName:"count" type:"long"`
387
388	// The maximum value found in the specified field in the result set.
389	//
390	// If the field is numeric (int, int-array, double, or double-array), max is
391	// the string representation of a double-precision 64-bit floating point value.
392	// If the field is date or date-array, max is the string representation of a
393	// date with the format specified in IETF RFC3339 (http://tools.ietf.org/html/rfc3339):
394	// yyyy-mm-ddTHH:mm:ss.SSSZ.
395	Max *string `locationName:"max" type:"string"`
396
397	// The average of the values found in the specified field in the result set.
398	//
399	// If the field is numeric (int, int-array, double, or double-array), mean is
400	// the string representation of a double-precision 64-bit floating point value.
401	// If the field is date or date-array, mean is the string representation of
402	// a date with the format specified in IETF RFC3339 (http://tools.ietf.org/html/rfc3339):
403	// yyyy-mm-ddTHH:mm:ss.SSSZ.
404	Mean *string `locationName:"mean" type:"string"`
405
406	// The minimum value found in the specified field in the result set.
407	//
408	// If the field is numeric (int, int-array, double, or double-array), min is
409	// the string representation of a double-precision 64-bit floating point value.
410	// If the field is date or date-array, min is the string representation of a
411	// date with the format specified in IETF RFC3339 (http://tools.ietf.org/html/rfc3339):
412	// yyyy-mm-ddTHH:mm:ss.SSSZ.
413	Min *string `locationName:"min" type:"string"`
414
415	// The number of documents that do not contain a value in the specified field
416	// in the result set.
417	Missing *int64 `locationName:"missing" type:"long"`
418
419	// The standard deviation of the values in the specified field in the result
420	// set.
421	Stddev *float64 `locationName:"stddev" type:"double"`
422
423	// The sum of the field values across the documents in the result set. null
424	// for date fields.
425	Sum *float64 `locationName:"sum" type:"double"`
426
427	// The sum of all field values in the result set squared.
428	SumOfSquares *float64 `locationName:"sumOfSquares" type:"double"`
429}
430
431// String returns the string representation
432func (s FieldStats) String() string {
433	return awsutil.Prettify(s)
434}
435
436// GoString returns the string representation
437func (s FieldStats) GoString() string {
438	return s.String()
439}
440
441// SetCount sets the Count field's value.
442func (s *FieldStats) SetCount(v int64) *FieldStats {
443	s.Count = &v
444	return s
445}
446
447// SetMax sets the Max field's value.
448func (s *FieldStats) SetMax(v string) *FieldStats {
449	s.Max = &v
450	return s
451}
452
453// SetMean sets the Mean field's value.
454func (s *FieldStats) SetMean(v string) *FieldStats {
455	s.Mean = &v
456	return s
457}
458
459// SetMin sets the Min field's value.
460func (s *FieldStats) SetMin(v string) *FieldStats {
461	s.Min = &v
462	return s
463}
464
465// SetMissing sets the Missing field's value.
466func (s *FieldStats) SetMissing(v int64) *FieldStats {
467	s.Missing = &v
468	return s
469}
470
471// SetStddev sets the Stddev field's value.
472func (s *FieldStats) SetStddev(v float64) *FieldStats {
473	s.Stddev = &v
474	return s
475}
476
477// SetSum sets the Sum field's value.
478func (s *FieldStats) SetSum(v float64) *FieldStats {
479	s.Sum = &v
480	return s
481}
482
483// SetSumOfSquares sets the SumOfSquares field's value.
484func (s *FieldStats) SetSumOfSquares(v float64) *FieldStats {
485	s.SumOfSquares = &v
486	return s
487}
488
489// Information about a document that matches the search request.
490type Hit struct {
491	_ struct{} `type:"structure"`
492
493	// The expressions returned from a document that matches the search request.
494	Exprs map[string]*string `locationName:"exprs" type:"map"`
495
496	// The fields returned from a document that matches the search request.
497	Fields map[string][]*string `locationName:"fields" type:"map"`
498
499	// The highlights returned from a document that matches the search request.
500	Highlights map[string]*string `locationName:"highlights" type:"map"`
501
502	// The document ID of a document that matches the search request.
503	Id *string `locationName:"id" type:"string"`
504}
505
506// String returns the string representation
507func (s Hit) String() string {
508	return awsutil.Prettify(s)
509}
510
511// GoString returns the string representation
512func (s Hit) GoString() string {
513	return s.String()
514}
515
516// SetExprs sets the Exprs field's value.
517func (s *Hit) SetExprs(v map[string]*string) *Hit {
518	s.Exprs = v
519	return s
520}
521
522// SetFields sets the Fields field's value.
523func (s *Hit) SetFields(v map[string][]*string) *Hit {
524	s.Fields = v
525	return s
526}
527
528// SetHighlights sets the Highlights field's value.
529func (s *Hit) SetHighlights(v map[string]*string) *Hit {
530	s.Highlights = v
531	return s
532}
533
534// SetId sets the Id field's value.
535func (s *Hit) SetId(v string) *Hit {
536	s.Id = &v
537	return s
538}
539
540// The collection of documents that match the search request.
541type Hits struct {
542	_ struct{} `type:"structure"`
543
544	// A cursor that can be used to retrieve the next set of matching documents
545	// when you want to page through a large result set.
546	Cursor *string `locationName:"cursor" type:"string"`
547
548	// The total number of documents that match the search request.
549	Found *int64 `locationName:"found" type:"long"`
550
551	// A document that matches the search request.
552	Hit []*Hit `locationName:"hit" type:"list"`
553
554	// The index of the first matching document.
555	Start *int64 `locationName:"start" type:"long"`
556}
557
558// String returns the string representation
559func (s Hits) String() string {
560	return awsutil.Prettify(s)
561}
562
563// GoString returns the string representation
564func (s Hits) GoString() string {
565	return s.String()
566}
567
568// SetCursor sets the Cursor field's value.
569func (s *Hits) SetCursor(v string) *Hits {
570	s.Cursor = &v
571	return s
572}
573
574// SetFound sets the Found field's value.
575func (s *Hits) SetFound(v int64) *Hits {
576	s.Found = &v
577	return s
578}
579
580// SetHit sets the Hit field's value.
581func (s *Hits) SetHit(v []*Hit) *Hits {
582	s.Hit = v
583	return s
584}
585
586// SetStart sets the Start field's value.
587func (s *Hits) SetStart(v int64) *Hits {
588	s.Start = &v
589	return s
590}
591
592// Container for the parameters to the Search request.
593type SearchInput struct {
594	_ struct{} `type:"structure"`
595
596	// Retrieves a cursor value you can use to page through large result sets. Use
597	// the size parameter to control the number of hits to include in each response.
598	// You can specify either the cursor or start parameter in a request; they are
599	// mutually exclusive. To get the first cursor, set the cursor value to initial.
600	// In subsequent requests, specify the cursor value returned in the hits section
601	// of the response.
602	//
603	// For more information, see Paginating Results (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html)
604	// in the Amazon CloudSearch Developer Guide.
605	Cursor *string `location:"querystring" locationName:"cursor" type:"string"`
606
607	// Defines one or more numeric expressions that can be used to sort results
608	// or specify search or filter criteria. You can also specify expressions as
609	// return fields.
610	//
611	// You specify the expressions in JSON using the form {"EXPRESSIONNAME":"EXPRESSION"}.
612	// You can define and use multiple expressions in a search request. For example:
613	//
614	// {"expression1":"_score*rating", "expression2":"(1/rank)*year"}
615	//
616	// For information about the variables, operators, and functions you can use
617	// in expressions, see Writing Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html#writing-expressions)
618	// in the Amazon CloudSearch Developer Guide.
619	Expr *string `location:"querystring" locationName:"expr" type:"string"`
620
621	// Specifies one or more fields for which to get facet information, and options
622	// that control how the facet information is returned. Each specified field
623	// must be facet-enabled in the domain configuration. The fields and options
624	// are specified in JSON using the form {"FIELD":{"OPTION":VALUE,"OPTION:"STRING"},"FIELD":{"OPTION":VALUE,"OPTION":"STRING"}}.
625	//
626	// You can specify the following faceting options:
627	//
628	//    * buckets specifies an array of the facet values or ranges to count. Ranges
629	//    are specified using the same syntax that you use to search for a range
630	//    of values. For more information, see  Searching for a Range of Values
631	//    (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-ranges.html)
632	//    in the Amazon CloudSearch Developer Guide. Buckets are returned in the
633	//    order they are specified in the request. The sort and size options are
634	//    not valid if you specify buckets.
635	//
636	//    * size specifies the maximum number of facets to include in the results.
637	//    By default, Amazon CloudSearch returns counts for the top 10. The size
638	//    parameter is only valid when you specify the sort option; it cannot be
639	//    used in conjunction with buckets.
640	//
641	//    * sort specifies how you want to sort the facets in the results: bucket
642	//    or count. Specify bucket to sort alphabetically or numerically by facet
643	//    value (in ascending order). Specify count to sort by the facet counts
644	//    computed for each facet value (in descending order). To retrieve facet
645	//    counts for particular values or ranges of values, use the buckets option
646	//    instead of sort.
647	//
648	// If no facet options are specified, facet counts are computed for all field
649	// values, the facets are sorted by facet count, and the top 10 facets are returned
650	// in the results.
651	//
652	// To count particular buckets of values, use the buckets option. For example,
653	// the following request uses the buckets option to calculate and return facet
654	// counts by decade.
655	//
656	// {"year":{"buckets":["[1970,1979]","[1980,1989]","[1990,1999]","[2000,2009]","[2010,}"]}}
657	//
658	// To sort facets by facet count, use the count option. For example, the following
659	// request sets the sort option to count to sort the facet values by facet count,
660	// with the facet values that have the most matching documents listed first.
661	// Setting the size option to 3 returns only the top three facet values.
662	//
663	// {"year":{"sort":"count","size":3}}
664	//
665	// To sort the facets by value, use the bucket option. For example, the following
666	// request sets the sort option to bucket to sort the facet values numerically
667	// by year, with earliest year listed first.
668	//
669	// {"year":{"sort":"bucket"}}
670	//
671	// For more information, see Getting and Using Facet Information (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/faceting.html)
672	// in the Amazon CloudSearch Developer Guide.
673	Facet *string `location:"querystring" locationName:"facet" type:"string"`
674
675	// Specifies a structured query that filters the results of a search without
676	// affecting how the results are scored and sorted. You use filterQuery in conjunction
677	// with the query parameter to filter the documents that match the constraints
678	// specified in the query parameter. Specifying a filter controls only which
679	// matching documents are included in the results, it has no effect on how they
680	// are scored and sorted. The filterQuery parameter supports the full structured
681	// query syntax.
682	//
683	// For more information about using filters, see Filtering Matching Documents
684	// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/filtering-results.html)
685	// in the Amazon CloudSearch Developer Guide.
686	FilterQuery *string `location:"querystring" locationName:"fq" type:"string"`
687
688	// Retrieves highlights for matches in the specified text or text-array fields.
689	// Each specified field must be highlight enabled in the domain configuration.
690	// The fields and options are specified in JSON using the form {"FIELD":{"OPTION":VALUE,"OPTION:"STRING"},"FIELD":{"OPTION":VALUE,"OPTION":"STRING"}}.
691	//
692	// You can specify the following highlight options:
693	//
694	//    * format: specifies the format of the data in the text field: text or
695	//    html. When data is returned as HTML, all non-alphanumeric characters are
696	//    encoded. The default is html.
697	//    * max_phrases: specifies the maximum number of occurrences of the search
698	//    term(s) you want to highlight. By default, the first occurrence is highlighted.
699	//
700	//    * pre_tag: specifies the string to prepend to an occurrence of a search
701	//    term. The default for HTML highlights is <em>. The default for text
702	//    highlights is *.
703	//    * post_tag: specifies the string to append to an occurrence of a search
704	//    term. The default for HTML highlights is </em>. The default for
705	//    text highlights is *.
706	// If no highlight options are specified for a field, the returned field text
707	// is treated as HTML and the first match is highlighted with emphasis tags:
708	// <em>search-term</em>.
709	//
710	// For example, the following request retrieves highlights for the actors and
711	// title fields.
712	//
713	// { "actors": {}, "title": {"format": "text","max_phrases": 2,"pre_tag": "","post_tag":
714	// ""} }
715	Highlight *string `location:"querystring" locationName:"highlight" type:"string"`
716
717	// Enables partial results to be returned if one or more index partitions are
718	// unavailable. When your search index is partitioned across multiple search
719	// instances, by default Amazon CloudSearch only returns results if every partition
720	// can be queried. This means that the failure of a single search instance can
721	// result in 5xx (internal server) errors. When you enable partial results,
722	// Amazon CloudSearch returns whatever results are available and includes the
723	// percentage of documents searched in the search results (percent-searched).
724	// This enables you to more gracefully degrade your users' search experience.
725	// For example, rather than displaying no results, you could display the partial
726	// results and a message indicating that the results might be incomplete due
727	// to a temporary system outage.
728	Partial *bool `location:"querystring" locationName:"partial" type:"boolean"`
729
730	// Specifies the search criteria for the request. How you specify the search
731	// criteria depends on the query parser used for the request and the parser
732	// options specified in the queryOptions parameter. By default, the simple query
733	// parser is used to process requests. To use the structured, lucene, or dismax
734	// query parser, you must also specify the queryParser parameter.
735	//
736	// For more information about specifying search criteria, see Searching Your
737	// Data (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html)
738	// in the Amazon CloudSearch Developer Guide.
739	//
740	// Query is a required field
741	Query *string `location:"querystring" locationName:"q" type:"string" required:"true"`
742
743	// Configures options for the query parser specified in the queryParser parameter.
744	// You specify the options in JSON using the following form {"OPTION1":"VALUE1","OPTION2":VALUE2"..."OPTIONN":"VALUEN"}.
745	//
746	// The options you can configure vary according to which parser you use:
747	//
748	//    * defaultOperator: The default operator used to combine individual terms
749	//    in the search string. For example: defaultOperator: 'or'. For the dismax
750	//    parser, you specify a percentage that represents the percentage of terms
751	//    in the search string (rounded down) that must match, rather than a default
752	//    operator. A value of 0% is the equivalent to OR, and a value of 100% is
753	//    equivalent to AND. The percentage must be specified as a value in the
754	//    range 0-100 followed by the percent (%) symbol. For example, defaultOperator:
755	//    50%. Valid values: and, or, a percentage in the range 0%-100% (dismax).
756	//    Default: and (simple, structured, lucene) or 100 (dismax). Valid for:
757	//    simple, structured, lucene, and dismax.
758	//    * fields: An array of the fields to search when no fields are specified
759	//    in a search. If no fields are specified in a search and this option is
760	//    not specified, all text and text-array fields are searched. You can specify
761	//    a weight for each field to control the relative importance of each field
762	//    when Amazon CloudSearch calculates relevance scores. To specify a field
763	//    weight, append a caret (^) symbol and the weight to the field name. For
764	//    example, to boost the importance of the title field over the description
765	//    field you could specify: "fields":["title^5","description"]. Valid values:
766	//    The name of any configured field and an optional numeric value greater
767	//    than zero. Default: All text and text-array fields. Valid for: simple,
768	//    structured, lucene, and dismax.
769	//    * operators: An array of the operators or special characters you want
770	//    to disable for the simple query parser. If you disable the and, or, or
771	//    not operators, the corresponding operators (+, |, -) have no special meaning
772	//    and are dropped from the search string. Similarly, disabling prefix disables
773	//    the wildcard operator (*) and disabling phrase disables the ability to
774	//    search for phrases by enclosing phrases in double quotes. Disabling precedence
775	//    disables the ability to control order of precedence using parentheses.
776	//    Disabling near disables the ability to use the ~ operator to perform a
777	//    sloppy phrase search. Disabling the fuzzy operator disables the ability
778	//    to use the ~ operator to perform a fuzzy search. escape disables the ability
779	//    to use a backslash (\) to escape special characters within the search
780	//    string. Disabling whitespace is an advanced option that prevents the parser
781	//    from tokenizing on whitespace, which can be useful for Vietnamese. (It
782	//    prevents Vietnamese words from being split incorrectly.) For example,
783	//    you could disable all operators other than the phrase operator to support
784	//    just simple term and phrase queries: "operators":["and","not","or", "prefix"].
785	//    Valid values: and, escape, fuzzy, near, not, or, phrase, precedence, prefix,
786	//    whitespace. Default: All operators and special characters are enabled.
787	//    Valid for: simple.
788	//    * phraseFields: An array of the text or text-array fields you want to
789	//    use for phrase searches. When the terms in the search string appear in
790	//    close proximity within a field, the field scores higher. You can specify
791	//    a weight for each field to boost that score. The phraseSlop option controls
792	//    how much the matches can deviate from the search string and still be boosted.
793	//    To specify a field weight, append a caret (^) symbol and the weight to
794	//    the field name. For example, to boost phrase matches in the title field
795	//    over the abstract field, you could specify: "phraseFields":["title^3",
796	//    "plot"] Valid values: The name of any text or text-array field and an
797	//    optional numeric value greater than zero. Default: No fields. If you don't
798	//    specify any fields with phraseFields, proximity scoring is disabled even
799	//    if phraseSlop is specified. Valid for: dismax.
800	//    * phraseSlop: An integer value that specifies how much matches can deviate
801	//    from the search phrase and still be boosted according to the weights specified
802	//    in the phraseFields option; for example, phraseSlop: 2. You must also
803	//    specify phraseFields to enable proximity scoring. Valid values: positive
804	//    integers. Default: 0. Valid for: dismax.
805	//    * explicitPhraseSlop: An integer value that specifies how much a match
806	//    can deviate from the search phrase when the phrase is enclosed in double
807	//    quotes in the search string. (Phrases that exceed this proximity distance
808	//    are not considered a match.) For example, to specify a slop of three for
809	//    dismax phrase queries, you would specify "explicitPhraseSlop":3. Valid
810	//    values: positive integers. Default: 0. Valid for: dismax.
811	//    * tieBreaker: When a term in the search string is found in a document's
812	//    field, a score is calculated for that field based on how common the word
813	//    is in that field compared to other documents. If the term occurs in multiple
814	//    fields within a document, by default only the highest scoring field contributes
815	//    to the document's overall score. You can specify a tieBreaker value to
816	//    enable the matches in lower-scoring fields to contribute to the document's
817	//    score. That way, if two documents have the same max field score for a
818	//    particular term, the score for the document that has matches in more fields
819	//    will be higher. The formula for calculating the score with a tieBreaker
820	//    is (max field score) + (tieBreaker) * (sum of the scores for the rest
821	//    of the matching fields). Set tieBreaker to 0 to disregard all but the
822	//    highest scoring field (pure max): "tieBreaker":0. Set to 1 to sum the
823	//    scores from all fields (pure sum): "tieBreaker":1. Valid values: 0.0 to
824	//    1.0. Default: 0.0. Valid for: dismax.
825	QueryOptions *string `location:"querystring" locationName:"q.options" type:"string"`
826
827	// Specifies which query parser to use to process the request. If queryParser
828	// is not specified, Amazon CloudSearch uses the simple query parser.
829	//
830	// Amazon CloudSearch supports four query parsers:
831	//
832	//    * simple: perform simple searches of text and text-array fields. By default,
833	//    the simple query parser searches all text and text-array fields. You can
834	//    specify which fields to search by with the queryOptions parameter. If
835	//    you prefix a search term with a plus sign (+) documents must contain the
836	//    term to be considered a match. (This is the default, unless you configure
837	//    the default operator with the queryOptions parameter.) You can use the
838	//    - (NOT), | (OR), and * (wildcard) operators to exclude particular terms,
839	//    find results that match any of the specified terms, or search for a prefix.
840	//    To search for a phrase rather than individual terms, enclose the phrase
841	//    in double quotes. For more information, see Searching for Text (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-text.html)
842	//    in the Amazon CloudSearch Developer Guide.
843	//    * structured: perform advanced searches by combining multiple expressions
844	//    to define the search criteria. You can also search within particular fields,
845	//    search for values and ranges of values, and use advanced options such
846	//    as term boosting, matchall, and near. For more information, see Constructing
847	//    Compound Queries (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-compound-queries.html)
848	//    in the Amazon CloudSearch Developer Guide.
849	//    * lucene: search using the Apache Lucene query parser syntax. For more
850	//    information, see Apache Lucene Query Parser Syntax (http://lucene.apache.org/core/4_6_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description).
851	//
852	//    * dismax: search using the simplified subset of the Apache Lucene query
853	//    parser syntax defined by the DisMax query parser. For more information,
854	//    see DisMax Query Parser Syntax (http://wiki.apache.org/solr/DisMaxQParserPlugin#Query_Syntax).
855	QueryParser *string `location:"querystring" locationName:"q.parser" type:"string" enum:"QueryParser"`
856
857	// Specifies the field and expression values to include in the response. Multiple
858	// fields or expressions are specified as a comma-separated list. By default,
859	// a search response includes all return enabled fields (_all_fields). To return
860	// only the document IDs for the matching documents, specify _no_fields. To
861	// retrieve the relevance score calculated for each document, specify _score.
862	Return *string `location:"querystring" locationName:"return" type:"string"`
863
864	// Specifies the maximum number of search hits to include in the response.
865	Size *int64 `location:"querystring" locationName:"size" type:"long"`
866
867	// Specifies the fields or custom expressions to use to sort the search results.
868	// Multiple fields or expressions are specified as a comma-separated list. You
869	// must specify the sort direction (asc or desc) for each field; for example,
870	// year desc,title asc. To use a field to sort results, the field must be sort-enabled
871	// in the domain configuration. Array type fields cannot be used for sorting.
872	// If no sort parameter is specified, results are sorted by their default relevance
873	// scores in descending order: _score desc. You can also sort by document ID
874	// (_id asc) and version (_version desc).
875	//
876	// For more information, see Sorting Results (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/sorting-results.html)
877	// in the Amazon CloudSearch Developer Guide.
878	Sort *string `location:"querystring" locationName:"sort" type:"string"`
879
880	// Specifies the offset of the first search hit you want to return. Note that
881	// the result set is zero-based; the first result is at index 0. You can specify
882	// either the start or cursor parameter in a request, they are mutually exclusive.
883	//
884	// For more information, see Paginating Results (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/paginating-results.html)
885	// in the Amazon CloudSearch Developer Guide.
886	Start *int64 `location:"querystring" locationName:"start" type:"long"`
887
888	// Specifies one or more fields for which to get statistics information. Each
889	// specified field must be facet-enabled in the domain configuration. The fields
890	// are specified in JSON using the form:
891	//
892	// {"FIELD-A":{},"FIELD-B":{}}There are currently no options supported for statistics.
893	Stats *string `location:"querystring" locationName:"stats" type:"string"`
894}
895
896// String returns the string representation
897func (s SearchInput) String() string {
898	return awsutil.Prettify(s)
899}
900
901// GoString returns the string representation
902func (s SearchInput) GoString() string {
903	return s.String()
904}
905
906// Validate inspects the fields of the type to determine if they are valid.
907func (s *SearchInput) Validate() error {
908	invalidParams := request.ErrInvalidParams{Context: "SearchInput"}
909	if s.Query == nil {
910		invalidParams.Add(request.NewErrParamRequired("Query"))
911	}
912
913	if invalidParams.Len() > 0 {
914		return invalidParams
915	}
916	return nil
917}
918
919// SetCursor sets the Cursor field's value.
920func (s *SearchInput) SetCursor(v string) *SearchInput {
921	s.Cursor = &v
922	return s
923}
924
925// SetExpr sets the Expr field's value.
926func (s *SearchInput) SetExpr(v string) *SearchInput {
927	s.Expr = &v
928	return s
929}
930
931// SetFacet sets the Facet field's value.
932func (s *SearchInput) SetFacet(v string) *SearchInput {
933	s.Facet = &v
934	return s
935}
936
937// SetFilterQuery sets the FilterQuery field's value.
938func (s *SearchInput) SetFilterQuery(v string) *SearchInput {
939	s.FilterQuery = &v
940	return s
941}
942
943// SetHighlight sets the Highlight field's value.
944func (s *SearchInput) SetHighlight(v string) *SearchInput {
945	s.Highlight = &v
946	return s
947}
948
949// SetPartial sets the Partial field's value.
950func (s *SearchInput) SetPartial(v bool) *SearchInput {
951	s.Partial = &v
952	return s
953}
954
955// SetQuery sets the Query field's value.
956func (s *SearchInput) SetQuery(v string) *SearchInput {
957	s.Query = &v
958	return s
959}
960
961// SetQueryOptions sets the QueryOptions field's value.
962func (s *SearchInput) SetQueryOptions(v string) *SearchInput {
963	s.QueryOptions = &v
964	return s
965}
966
967// SetQueryParser sets the QueryParser field's value.
968func (s *SearchInput) SetQueryParser(v string) *SearchInput {
969	s.QueryParser = &v
970	return s
971}
972
973// SetReturn sets the Return field's value.
974func (s *SearchInput) SetReturn(v string) *SearchInput {
975	s.Return = &v
976	return s
977}
978
979// SetSize sets the Size field's value.
980func (s *SearchInput) SetSize(v int64) *SearchInput {
981	s.Size = &v
982	return s
983}
984
985// SetSort sets the Sort field's value.
986func (s *SearchInput) SetSort(v string) *SearchInput {
987	s.Sort = &v
988	return s
989}
990
991// SetStart sets the Start field's value.
992func (s *SearchInput) SetStart(v int64) *SearchInput {
993	s.Start = &v
994	return s
995}
996
997// SetStats sets the Stats field's value.
998func (s *SearchInput) SetStats(v string) *SearchInput {
999	s.Stats = &v
1000	return s
1001}
1002
1003// The result of a Search request. Contains the documents that match the specified
1004// search criteria and any requested fields, highlights, and facet information.
1005type SearchOutput struct {
1006	_ struct{} `type:"structure"`
1007
1008	// The requested facet information.
1009	Facets map[string]*BucketInfo `locationName:"facets" type:"map"`
1010
1011	// The documents that match the search criteria.
1012	Hits *Hits `locationName:"hits" type:"structure"`
1013
1014	// The requested field statistics information.
1015	Stats map[string]*FieldStats `locationName:"stats" type:"map"`
1016
1017	// The status information returned for the search request.
1018	Status *SearchStatus `locationName:"status" type:"structure"`
1019}
1020
1021// String returns the string representation
1022func (s SearchOutput) String() string {
1023	return awsutil.Prettify(s)
1024}
1025
1026// GoString returns the string representation
1027func (s SearchOutput) GoString() string {
1028	return s.String()
1029}
1030
1031// SetFacets sets the Facets field's value.
1032func (s *SearchOutput) SetFacets(v map[string]*BucketInfo) *SearchOutput {
1033	s.Facets = v
1034	return s
1035}
1036
1037// SetHits sets the Hits field's value.
1038func (s *SearchOutput) SetHits(v *Hits) *SearchOutput {
1039	s.Hits = v
1040	return s
1041}
1042
1043// SetStats sets the Stats field's value.
1044func (s *SearchOutput) SetStats(v map[string]*FieldStats) *SearchOutput {
1045	s.Stats = v
1046	return s
1047}
1048
1049// SetStatus sets the Status field's value.
1050func (s *SearchOutput) SetStatus(v *SearchStatus) *SearchOutput {
1051	s.Status = v
1052	return s
1053}
1054
1055// Contains the resource id (rid) and the time it took to process the request
1056// (timems).
1057type SearchStatus struct {
1058	_ struct{} `type:"structure"`
1059
1060	// The encrypted resource ID for the request.
1061	Rid *string `locationName:"rid" type:"string"`
1062
1063	// How long it took to process the request, in milliseconds.
1064	Timems *int64 `locationName:"timems" type:"long"`
1065}
1066
1067// String returns the string representation
1068func (s SearchStatus) String() string {
1069	return awsutil.Prettify(s)
1070}
1071
1072// GoString returns the string representation
1073func (s SearchStatus) GoString() string {
1074	return s.String()
1075}
1076
1077// SetRid sets the Rid field's value.
1078func (s *SearchStatus) SetRid(v string) *SearchStatus {
1079	s.Rid = &v
1080	return s
1081}
1082
1083// SetTimems sets the Timems field's value.
1084func (s *SearchStatus) SetTimems(v int64) *SearchStatus {
1085	s.Timems = &v
1086	return s
1087}
1088
1089// Container for the parameters to the Suggest request.
1090type SuggestInput struct {
1091	_ struct{} `type:"structure"`
1092
1093	// Specifies the string for which you want to get suggestions.
1094	//
1095	// Query is a required field
1096	Query *string `location:"querystring" locationName:"q" type:"string" required:"true"`
1097
1098	// Specifies the maximum number of suggestions to return.
1099	Size *int64 `location:"querystring" locationName:"size" type:"long"`
1100
1101	// Specifies the name of the suggester to use to find suggested matches.
1102	//
1103	// Suggester is a required field
1104	Suggester *string `location:"querystring" locationName:"suggester" type:"string" required:"true"`
1105}
1106
1107// String returns the string representation
1108func (s SuggestInput) String() string {
1109	return awsutil.Prettify(s)
1110}
1111
1112// GoString returns the string representation
1113func (s SuggestInput) GoString() string {
1114	return s.String()
1115}
1116
1117// Validate inspects the fields of the type to determine if they are valid.
1118func (s *SuggestInput) Validate() error {
1119	invalidParams := request.ErrInvalidParams{Context: "SuggestInput"}
1120	if s.Query == nil {
1121		invalidParams.Add(request.NewErrParamRequired("Query"))
1122	}
1123	if s.Suggester == nil {
1124		invalidParams.Add(request.NewErrParamRequired("Suggester"))
1125	}
1126
1127	if invalidParams.Len() > 0 {
1128		return invalidParams
1129	}
1130	return nil
1131}
1132
1133// SetQuery sets the Query field's value.
1134func (s *SuggestInput) SetQuery(v string) *SuggestInput {
1135	s.Query = &v
1136	return s
1137}
1138
1139// SetSize sets the Size field's value.
1140func (s *SuggestInput) SetSize(v int64) *SuggestInput {
1141	s.Size = &v
1142	return s
1143}
1144
1145// SetSuggester sets the Suggester field's value.
1146func (s *SuggestInput) SetSuggester(v string) *SuggestInput {
1147	s.Suggester = &v
1148	return s
1149}
1150
1151// Container for the suggestion information returned in a SuggestResponse.
1152type SuggestModel struct {
1153	_ struct{} `type:"structure"`
1154
1155	// The number of documents that were found to match the query string.
1156	Found *int64 `locationName:"found" type:"long"`
1157
1158	// The query string specified in the suggest request.
1159	Query *string `locationName:"query" type:"string"`
1160
1161	// The documents that match the query string.
1162	Suggestions []*SuggestionMatch `locationName:"suggestions" type:"list"`
1163}
1164
1165// String returns the string representation
1166func (s SuggestModel) String() string {
1167	return awsutil.Prettify(s)
1168}
1169
1170// GoString returns the string representation
1171func (s SuggestModel) GoString() string {
1172	return s.String()
1173}
1174
1175// SetFound sets the Found field's value.
1176func (s *SuggestModel) SetFound(v int64) *SuggestModel {
1177	s.Found = &v
1178	return s
1179}
1180
1181// SetQuery sets the Query field's value.
1182func (s *SuggestModel) SetQuery(v string) *SuggestModel {
1183	s.Query = &v
1184	return s
1185}
1186
1187// SetSuggestions sets the Suggestions field's value.
1188func (s *SuggestModel) SetSuggestions(v []*SuggestionMatch) *SuggestModel {
1189	s.Suggestions = v
1190	return s
1191}
1192
1193// Contains the response to a Suggest request.
1194type SuggestOutput struct {
1195	_ struct{} `type:"structure"`
1196
1197	// The status of a SuggestRequest. Contains the resource ID (rid) and how long
1198	// it took to process the request (timems).
1199	Status *SuggestStatus `locationName:"status" type:"structure"`
1200
1201	// Container for the matching search suggestion information.
1202	Suggest *SuggestModel `locationName:"suggest" type:"structure"`
1203}
1204
1205// String returns the string representation
1206func (s SuggestOutput) String() string {
1207	return awsutil.Prettify(s)
1208}
1209
1210// GoString returns the string representation
1211func (s SuggestOutput) GoString() string {
1212	return s.String()
1213}
1214
1215// SetStatus sets the Status field's value.
1216func (s *SuggestOutput) SetStatus(v *SuggestStatus) *SuggestOutput {
1217	s.Status = v
1218	return s
1219}
1220
1221// SetSuggest sets the Suggest field's value.
1222func (s *SuggestOutput) SetSuggest(v *SuggestModel) *SuggestOutput {
1223	s.Suggest = v
1224	return s
1225}
1226
1227// Contains the resource id (rid) and the time it took to process the request
1228// (timems).
1229type SuggestStatus struct {
1230	_ struct{} `type:"structure"`
1231
1232	// The encrypted resource ID for the request.
1233	Rid *string `locationName:"rid" type:"string"`
1234
1235	// How long it took to process the request, in milliseconds.
1236	Timems *int64 `locationName:"timems" type:"long"`
1237}
1238
1239// String returns the string representation
1240func (s SuggestStatus) String() string {
1241	return awsutil.Prettify(s)
1242}
1243
1244// GoString returns the string representation
1245func (s SuggestStatus) GoString() string {
1246	return s.String()
1247}
1248
1249// SetRid sets the Rid field's value.
1250func (s *SuggestStatus) SetRid(v string) *SuggestStatus {
1251	s.Rid = &v
1252	return s
1253}
1254
1255// SetTimems sets the Timems field's value.
1256func (s *SuggestStatus) SetTimems(v int64) *SuggestStatus {
1257	s.Timems = &v
1258	return s
1259}
1260
1261// An autocomplete suggestion that matches the query string specified in a SuggestRequest.
1262type SuggestionMatch struct {
1263	_ struct{} `type:"structure"`
1264
1265	// The document ID of the suggested document.
1266	Id *string `locationName:"id" type:"string"`
1267
1268	// The relevance score of a suggested match.
1269	Score *int64 `locationName:"score" type:"long"`
1270
1271	// The string that matches the query string specified in the SuggestRequest.
1272	Suggestion *string `locationName:"suggestion" type:"string"`
1273}
1274
1275// String returns the string representation
1276func (s SuggestionMatch) String() string {
1277	return awsutil.Prettify(s)
1278}
1279
1280// GoString returns the string representation
1281func (s SuggestionMatch) GoString() string {
1282	return s.String()
1283}
1284
1285// SetId sets the Id field's value.
1286func (s *SuggestionMatch) SetId(v string) *SuggestionMatch {
1287	s.Id = &v
1288	return s
1289}
1290
1291// SetScore sets the Score field's value.
1292func (s *SuggestionMatch) SetScore(v int64) *SuggestionMatch {
1293	s.Score = &v
1294	return s
1295}
1296
1297// SetSuggestion sets the Suggestion field's value.
1298func (s *SuggestionMatch) SetSuggestion(v string) *SuggestionMatch {
1299	s.Suggestion = &v
1300	return s
1301}
1302
1303// Container for the parameters to the UploadDocuments request.
1304type UploadDocumentsInput struct {
1305	_ struct{} `type:"structure" payload:"Documents"`
1306
1307	// The format of the batch you are uploading. Amazon CloudSearch supports two
1308	// document batch formats:
1309	//
1310	//    * application/json
1311	//    * application/xml
1312	//
1313	// ContentType is a required field
1314	ContentType *string `location:"header" locationName:"Content-Type" type:"string" required:"true" enum:"ContentType"`
1315
1316	// A batch of documents formatted in JSON or HTML.
1317	//
1318	// Documents is a required field
1319	Documents io.ReadSeeker `locationName:"documents" type:"blob" required:"true"`
1320}
1321
1322// String returns the string representation
1323func (s UploadDocumentsInput) String() string {
1324	return awsutil.Prettify(s)
1325}
1326
1327// GoString returns the string representation
1328func (s UploadDocumentsInput) GoString() string {
1329	return s.String()
1330}
1331
1332// Validate inspects the fields of the type to determine if they are valid.
1333func (s *UploadDocumentsInput) Validate() error {
1334	invalidParams := request.ErrInvalidParams{Context: "UploadDocumentsInput"}
1335	if s.ContentType == nil {
1336		invalidParams.Add(request.NewErrParamRequired("ContentType"))
1337	}
1338	if s.Documents == nil {
1339		invalidParams.Add(request.NewErrParamRequired("Documents"))
1340	}
1341
1342	if invalidParams.Len() > 0 {
1343		return invalidParams
1344	}
1345	return nil
1346}
1347
1348// SetContentType sets the ContentType field's value.
1349func (s *UploadDocumentsInput) SetContentType(v string) *UploadDocumentsInput {
1350	s.ContentType = &v
1351	return s
1352}
1353
1354// SetDocuments sets the Documents field's value.
1355func (s *UploadDocumentsInput) SetDocuments(v io.ReadSeeker) *UploadDocumentsInput {
1356	s.Documents = v
1357	return s
1358}
1359
1360// Contains the response to an UploadDocuments request.
1361type UploadDocumentsOutput struct {
1362	_ struct{} `type:"structure"`
1363
1364	// The number of documents that were added to the search domain.
1365	Adds *int64 `locationName:"adds" type:"long"`
1366
1367	// The number of documents that were deleted from the search domain.
1368	Deletes *int64 `locationName:"deletes" type:"long"`
1369
1370	// The status of an UploadDocumentsRequest.
1371	Status *string `locationName:"status" type:"string"`
1372
1373	// Any warnings returned by the document service about the documents being uploaded.
1374	Warnings []*DocumentServiceWarning `locationName:"warnings" type:"list"`
1375}
1376
1377// String returns the string representation
1378func (s UploadDocumentsOutput) String() string {
1379	return awsutil.Prettify(s)
1380}
1381
1382// GoString returns the string representation
1383func (s UploadDocumentsOutput) GoString() string {
1384	return s.String()
1385}
1386
1387// SetAdds sets the Adds field's value.
1388func (s *UploadDocumentsOutput) SetAdds(v int64) *UploadDocumentsOutput {
1389	s.Adds = &v
1390	return s
1391}
1392
1393// SetDeletes sets the Deletes field's value.
1394func (s *UploadDocumentsOutput) SetDeletes(v int64) *UploadDocumentsOutput {
1395	s.Deletes = &v
1396	return s
1397}
1398
1399// SetStatus sets the Status field's value.
1400func (s *UploadDocumentsOutput) SetStatus(v string) *UploadDocumentsOutput {
1401	s.Status = &v
1402	return s
1403}
1404
1405// SetWarnings sets the Warnings field's value.
1406func (s *UploadDocumentsOutput) SetWarnings(v []*DocumentServiceWarning) *UploadDocumentsOutput {
1407	s.Warnings = v
1408	return s
1409}
1410
1411const (
1412	// ContentTypeApplicationJson is a ContentType enum value
1413	ContentTypeApplicationJson = "application/json"
1414
1415	// ContentTypeApplicationXml is a ContentType enum value
1416	ContentTypeApplicationXml = "application/xml"
1417)
1418
1419const (
1420	// QueryParserSimple is a QueryParser enum value
1421	QueryParserSimple = "simple"
1422
1423	// QueryParserStructured is a QueryParser enum value
1424	QueryParserStructured = "structured"
1425
1426	// QueryParserLucene is a QueryParser enum value
1427	QueryParserLucene = "lucene"
1428
1429	// QueryParserDismax is a QueryParser enum value
1430	QueryParserDismax = "dismax"
1431)
1432