amazonka-cloudsearch-domains-2.0: Amazon CloudSearch Domain SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.CloudSearchDomains.Suggest

Description

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.

Synopsis

Creating a Request

data Suggest Source #

Container for the parameters to the Suggest request.

See: newSuggest smart constructor.

Constructors

Suggest' 

Fields

  • size :: Maybe Integer

    Specifies the maximum number of suggestions to return.

  • query :: Text

    Specifies the string for which you want to get suggestions.

  • suggester :: Text

    Specifies the name of the suggester to use to find suggested matches.

Instances

Instances details
ToHeaders Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

Methods

toHeaders :: Suggest -> [Header] #

ToPath Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

Methods

toPath :: Suggest -> ByteString #

ToQuery Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

AWSRequest Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

Associated Types

type AWSResponse Suggest #

Generic Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

Associated Types

type Rep Suggest :: Type -> Type #

Methods

from :: Suggest -> Rep Suggest x #

to :: Rep Suggest x -> Suggest #

Read Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

Show Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

NFData Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

Methods

rnf :: Suggest -> () #

Eq Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

Methods

(==) :: Suggest -> Suggest -> Bool #

(/=) :: Suggest -> Suggest -> Bool #

Hashable Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

Methods

hashWithSalt :: Int -> Suggest -> Int #

hash :: Suggest -> Int #

type AWSResponse Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

type Rep Suggest Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

type Rep Suggest = D1 ('MetaData "Suggest" "Amazonka.CloudSearchDomains.Suggest" "amazonka-cloudsearch-domains-2.0-IDp90WQyZTIipPfNcVjL2" 'False) (C1 ('MetaCons "Suggest'" 'PrefixI 'True) (S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "query") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "suggester") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newSuggest Source #

Create a value of Suggest with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:size:Suggest', suggest_size - Specifies the maximum number of suggestions to return.

Suggest, suggest_query - Specifies the string for which you want to get suggestions.

$sel:suggester:Suggest', suggest_suggester - Specifies the name of the suggester to use to find suggested matches.

Request Lenses

suggest_size :: Lens' Suggest (Maybe Integer) Source #

Specifies the maximum number of suggestions to return.

suggest_query :: Lens' Suggest Text Source #

Specifies the string for which you want to get suggestions.

suggest_suggester :: Lens' Suggest Text Source #

Specifies the name of the suggester to use to find suggested matches.

Destructuring the Response

data SuggestResponse Source #

Contains the response to a Suggest request.

See: newSuggestResponse smart constructor.

Constructors

SuggestResponse' 

Fields

Instances

Instances details
Generic SuggestResponse Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

Associated Types

type Rep SuggestResponse :: Type -> Type #

Read SuggestResponse Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

Show SuggestResponse Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

NFData SuggestResponse Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

Methods

rnf :: SuggestResponse -> () #

Eq SuggestResponse Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

type Rep SuggestResponse Source # 
Instance details

Defined in Amazonka.CloudSearchDomains.Suggest

type Rep SuggestResponse = D1 ('MetaData "SuggestResponse" "Amazonka.CloudSearchDomains.Suggest" "amazonka-cloudsearch-domains-2.0-IDp90WQyZTIipPfNcVjL2" 'False) (C1 ('MetaCons "SuggestResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SuggestStatus)) :*: (S1 ('MetaSel ('Just "suggest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SuggestModel)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newSuggestResponse Source #

Create a value of SuggestResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:status:SuggestResponse', suggestResponse_status - The status of a SuggestRequest. Contains the resource ID (rid) and how long it took to process the request (timems).

$sel:suggest:SuggestResponse', suggestResponse_suggest - Container for the matching search suggestion information.

$sel:httpStatus:SuggestResponse', suggestResponse_httpStatus - The response's http status code.

Response Lenses

suggestResponse_status :: Lens' SuggestResponse (Maybe SuggestStatus) Source #

The status of a SuggestRequest. Contains the resource ID (rid) and how long it took to process the request (timems).

suggestResponse_suggest :: Lens' SuggestResponse (Maybe SuggestModel) Source #

Container for the matching search suggestion information.

suggestResponse_httpStatus :: Lens' SuggestResponse Int Source #

The response's http status code.