cloudsearchdomain

package
v0.0.0-...-fd97e0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2016 License: Apache-2.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package cloudsearchdomain provides a client for Amazon CloudSearch Domain.

Index

Constants

View Source
const (
	ContentTypeApplicationJSON = "application/json"
	ContentTypeApplicationXML  = "application/xml"
)

Possible values for CloudSearchDomain.

View Source
const (
	QueryParserDismax     = "dismax"
	QueryParserLucene     = "lucene"
	QueryParserSimple     = "simple"
	QueryParserStructured = "structured"
)

Possible values for CloudSearchDomain.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	Count aws.LongValue   `json:"count,omitempty"`
	Value aws.StringValue `json:"value,omitempty"`
}

Bucket is undocumented.

type BucketInfo

type BucketInfo struct {
	Buckets []Bucket `json:"buckets,omitempty"`
}

BucketInfo is undocumented.

type CloudSearchDomain

type CloudSearchDomain struct {
	// contains filtered or unexported fields
}

CloudSearchDomain is a client for Amazon CloudSearch Domain.

func New

func New(creds aws.CredentialsProvider, region string, client *http.Client) *CloudSearchDomain

New returns a new CloudSearchDomain client.

func (*CloudSearchDomain) Search

func (c *CloudSearchDomain) Search(req *SearchRequest) (resp *SearchResponse, err error)

Search 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 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.

func (*CloudSearchDomain) Suggest

func (c *CloudSearchDomain) Suggest(req *SuggestRequest) (resp *SuggestResponse, err error)

Suggest 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 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.

func (*CloudSearchDomain) UploadDocuments

func (c *CloudSearchDomain) UploadDocuments(req *UploadDocumentsRequest) (resp *UploadDocumentsResponse, err error)

UploadDocuments 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 or 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 in the Amazon CloudSearch Developer Guide . For more information about uploading data for indexing, see Uploading Data in the Amazon CloudSearch Developer Guide .

type DocumentServiceWarning

type DocumentServiceWarning struct {
	Message aws.StringValue `json:"message,omitempty"`
}

DocumentServiceWarning is undocumented.

type Hit

type Hit struct {
	Fields     map[string][]string `json:"fields,omitempty"`
	Highlights map[string]string   `json:"highlights,omitempty"`
	ID         aws.StringValue     `json:"id,omitempty"`
}

Hit is undocumented.

type Hits

type Hits struct {
	Cursor aws.StringValue `json:"cursor,omitempty"`
	Found  aws.LongValue   `json:"found,omitempty"`
	Hit    []Hit           `json:"hit,omitempty"`
	Start  aws.LongValue   `json:"start,omitempty"`
}

Hits is undocumented.

type SearchRequest

type SearchRequest struct {
	Cursor       aws.StringValue  `json:"-"`
	Expr         aws.StringValue  `json:"-"`
	Facet        aws.StringValue  `json:"-"`
	FilterQuery  aws.StringValue  `json:"-"`
	Highlight    aws.StringValue  `json:"-"`
	Partial      aws.BooleanValue `json:"-"`
	Query        aws.StringValue  `json:"-"`
	QueryOptions aws.StringValue  `json:"-"`
	QueryParser  aws.StringValue  `json:"-"`
	Return       aws.StringValue  `json:"-"`
	Size         aws.LongValue    `json:"-"`
	Sort         aws.StringValue  `json:"-"`
	Start        aws.LongValue    `json:"-"`
}

SearchRequest is undocumented.

type SearchResponse

type SearchResponse struct {
	Facets map[string]BucketInfo `json:"facets,omitempty"`
	Hits   *Hits                 `json:"hits,omitempty"`
	Status *SearchStatus         `json:"status,omitempty"`
}

SearchResponse is undocumented.

type SearchStatus

type SearchStatus struct {
	Rid    aws.StringValue `json:"rid,omitempty"`
	Timems aws.LongValue   `json:"timems,omitempty"`
}

SearchStatus is undocumented.

type SuggestModel

type SuggestModel struct {
	Found       aws.LongValue     `json:"found,omitempty"`
	Query       aws.StringValue   `json:"query,omitempty"`
	Suggestions []SuggestionMatch `json:"suggestions,omitempty"`
}

SuggestModel is undocumented.

type SuggestRequest

type SuggestRequest struct {
	Query     aws.StringValue `json:"-"`
	Size      aws.LongValue   `json:"-"`
	Suggester aws.StringValue `json:"-"`
}

SuggestRequest is undocumented.

type SuggestResponse

type SuggestResponse struct {
	Status  *SuggestStatus `json:"status,omitempty"`
	Suggest *SuggestModel  `json:"suggest,omitempty"`
}

SuggestResponse is undocumented.

type SuggestStatus

type SuggestStatus struct {
	Rid    aws.StringValue `json:"rid,omitempty"`
	Timems aws.LongValue   `json:"timems,omitempty"`
}

SuggestStatus is undocumented.

type SuggestionMatch

type SuggestionMatch struct {
	ID         aws.StringValue `json:"id,omitempty"`
	Score      aws.LongValue   `json:"score,omitempty"`
	Suggestion aws.StringValue `json:"suggestion,omitempty"`
}

SuggestionMatch is undocumented.

type UploadDocumentsRequest

type UploadDocumentsRequest struct {
	ContentType aws.StringValue `json:"-"`
	Documents   []byte          `json:"documents"`
}

UploadDocumentsRequest is undocumented.

type UploadDocumentsResponse

type UploadDocumentsResponse struct {
	Adds     aws.LongValue            `json:"adds,omitempty"`
	Deletes  aws.LongValue            `json:"deletes,omitempty"`
	Status   aws.StringValue          `json:"status,omitempty"`
	Warnings []DocumentServiceWarning `json:"warnings,omitempty"`
}

UploadDocumentsResponse is undocumented.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL