AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CloudSearchDomain

import "github.com/aws/aws-sdk-go/service/cloudsearchdomain"

type CloudSearchDomain struct { *client.Client }

CloudSearchDomain provides the API operation methods for making requests to Amazon CloudSearch Domain. See this package's package overview docs for details on the service.

CloudSearchDomain methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

Client

Type: *client.Client

Method

Search

func (c *CloudSearchDomain) Search(input *SearchInput) (*SearchOutput, error)

Search API operation for Amazon CloudSearch Domain.

Retrieves a list of documents that match the specified search criteria. How you specify the search criteria depends on which query parser you use. Amazon CloudSearch supports four query parsers:

  • simple: search all text and text-array fields for the specified string. Search for phrases, individual terms, and prefixes.

  • structured: search specific fields, construct compound queries using Boolean operators, and use advanced features such as term boosting and proximity searching.

  • lucene: specify search criteria using the Apache Lucene query parser syntax.

  • dismax: specify search criteria using the simplified subset of the Apache Lucene query parser syntax defined by the DisMax query parser.

For more information, see Searching Your Data (https://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html) in the Amazon CloudSearch Developer Guide.

The endpoint for submitting Search requests is domain-specific. You submit search requests to a domain's search endpoint. To get the search endpoint for your domain, use the Amazon CloudSearch configuration service DescribeDomains action. A domain's endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudSearch Domain's API operation Search for usage and error information.

Returned Error Codes:

  • ErrCodeSearchException "SearchException" Information about any problems encountered while processing a search request.

See Also

For more information about using this API, see AWS API Documentation.

SearchRequest

func (c *CloudSearchDomain) SearchRequest(input *SearchInput) (req *request.Request, output *SearchOutput)

SearchRequest generates a "aws/request.Request" representing the client's request for the Search operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See Search for more information on using the Search API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the SearchRequest method. req, resp := client.SearchRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See Also

For more information about using this API, see AWS API Documentation.

SearchWithContext

func (c *CloudSearchDomain) SearchWithContext(ctx aws.Context, input *SearchInput, opts ...request.Option) (*SearchOutput, error)

SearchWithContext is the same as Search with the addition of the ability to pass a context and additional request options.

See Search for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

Suggest

func (c *CloudSearchDomain) Suggest(input *SuggestInput) (*SuggestOutput, error)

Suggest API operation for Amazon CloudSearch Domain.

Retrieves autocomplete suggestions for a partial query string. You can use suggestions enable you to display likely matches before users finish typing. In Amazon CloudSearch, suggestions are based on the contents of a particular text field. When you request suggestions, Amazon CloudSearch finds all of the documents whose values in the suggester field start with the specified query string. The beginning of the field must match the query string to be considered a match.

For more information about configuring suggesters and retrieving suggestions, see Getting Suggestions (https://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html) in the Amazon CloudSearch Developer Guide.

The endpoint for submitting Suggest requests is domain-specific. You submit suggest requests to a domain's search endpoint. To get the search endpoint for your domain, use the Amazon CloudSearch configuration service DescribeDomains action. A domain's endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudSearch Domain's API operation Suggest for usage and error information.

Returned Error Codes:

  • ErrCodeSearchException "SearchException" Information about any problems encountered while processing a search request.

See Also

For more information about using this API, see AWS API Documentation.

SuggestRequest

func (c *CloudSearchDomain) SuggestRequest(input *SuggestInput) (req *request.Request, output *SuggestOutput)

SuggestRequest generates a "aws/request.Request" representing the client's request for the Suggest operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See Suggest for more information on using the Suggest API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the SuggestRequest method. req, resp := client.SuggestRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See Also

For more information about using this API, see AWS API Documentation.

SuggestWithContext

func (c *CloudSearchDomain) SuggestWithContext(ctx aws.Context, input *SuggestInput, opts ...request.Option) (*SuggestOutput, error)

SuggestWithContext is the same as Suggest with the addition of the ability to pass a context and additional request options.

See Suggest for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UploadDocuments

func (c *CloudSearchDomain) UploadDocuments(input *UploadDocumentsInput) (*UploadDocumentsOutput, error)

UploadDocuments API operation for Amazon CloudSearch Domain.

Posts a batch of documents to a search domain for indexing. A document batch is a collection of add and delete operations that represent the documents you want to add, update, or delete from your domain. Batches can be described in either JSON or XML. Each item that you want Amazon CloudSearch to return as a search result (such as a product) is represented as a document. Every document has a unique ID and one or more fields that contain the data that you want to search and return in results. Individual documents cannot contain more than 1 MB of data. The entire batch cannot exceed 5 MB. To get the best possible upload performance, group add and delete operations in batches that are close the 5 MB limit. Submitting a large volume of single-document batches can overload a domain's document service.

The endpoint for submitting UploadDocuments requests is domain-specific. To get the document endpoint for your domain, use the Amazon CloudSearch configuration service DescribeDomains action. A domain's endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console.

For more information about formatting your data for Amazon CloudSearch, see Preparing Your Data (https://docs.aws.amazon.com/cloudsearch/latest/developerguide/preparing-data.html) in the Amazon CloudSearch Developer Guide. For more information about uploading data for indexing, see Uploading Data (https://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html) in the Amazon CloudSearch Developer Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudSearch Domain's API operation UploadDocuments for usage and error information.

Returned Error Codes:

  • ErrCodeDocumentServiceException "DocumentServiceException" Information about any problems encountered while processing an upload request.

See Also

For more information about using this API, see AWS API Documentation.

UploadDocumentsRequest

func (c *CloudSearchDomain) UploadDocumentsRequest(input *UploadDocumentsInput) (req *request.Request, output *UploadDocumentsOutput)

UploadDocumentsRequest generates a "aws/request.Request" representing the client's request for the UploadDocuments operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UploadDocuments for more information on using the UploadDocuments API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UploadDocumentsRequest method. req, resp := client.UploadDocumentsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See Also

For more information about using this API, see AWS API Documentation.

UploadDocumentsWithContext

func (c *CloudSearchDomain) UploadDocumentsWithContext(ctx aws.Context, input *UploadDocumentsInput, opts ...request.Option) (*UploadDocumentsOutput, error)

UploadDocumentsWithContext is the same as UploadDocuments with the addition of the ability to pass a context and additional request options.

See UploadDocuments for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

On this page: