amazonka-cloudsearch-domains-1.4.5: Amazon CloudSearch Domain SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.CloudSearchDomains.Suggest

Contents

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

suggest Source #

Creates a value of Suggest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • sSize - Specifies the maximum number of suggestions to return.
  • sQuery - Specifies the string for which you want to get suggestions.
  • sSuggester - Specifies the name of the suggester to use to find suggested matches.

data Suggest Source #

Container for the parameters to the Suggest request.

See: suggest smart constructor.

Instances

Eq Suggest Source # 

Methods

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

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

Data Suggest Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Suggest -> c Suggest #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Suggest #

toConstr :: Suggest -> Constr #

dataTypeOf :: Suggest -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Suggest) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Suggest) #

gmapT :: (forall b. Data b => b -> b) -> Suggest -> Suggest #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Suggest -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Suggest -> r #

gmapQ :: (forall d. Data d => d -> u) -> Suggest -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Suggest -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Suggest -> m Suggest #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Suggest -> m Suggest #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Suggest -> m Suggest #

Read Suggest Source # 
Show Suggest Source # 
Generic Suggest Source # 

Associated Types

type Rep Suggest :: * -> * #

Methods

from :: Suggest -> Rep Suggest x #

to :: Rep Suggest x -> Suggest #

Hashable Suggest Source # 

Methods

hashWithSalt :: Int -> Suggest -> Int #

hash :: Suggest -> Int #

NFData Suggest Source # 

Methods

rnf :: Suggest -> () #

AWSRequest Suggest Source # 

Associated Types

type Rs Suggest :: * #

ToPath Suggest Source # 

Methods

toPath :: Suggest -> ByteString #

ToHeaders Suggest Source # 

Methods

toHeaders :: Suggest -> [Header] #

ToQuery Suggest Source # 
type Rep Suggest Source # 
type Rep Suggest = D1 (MetaData "Suggest" "Network.AWS.CloudSearchDomains.Suggest" "amazonka-cloudsearch-domains-1.4.5-1i0V9nIH6kwCncgjgJLojl" False) (C1 (MetaCons "Suggest'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_sSize") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Integer))) ((:*:) (S1 (MetaSel (Just Symbol "_sQuery") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_sSuggester") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs Suggest Source # 

Request Lenses

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

Specifies the maximum number of suggestions to return.

sQuery :: Lens' Suggest Text Source #

Specifies the string for which you want to get suggestions.

sSuggester :: Lens' Suggest Text Source #

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

Destructuring the Response

suggestResponse Source #

Creates a value of SuggestResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • srsSuggest - Container for the matching search suggestion information.
  • srsStatus - The status of a SuggestRequest . Contains the resource ID (rid ) and how long it took to process the request (timems ).
  • srsResponseStatus - -- | The response status code.

data SuggestResponse Source #

Contains the response to a Suggest request.

See: suggestResponse smart constructor.

Instances

Eq SuggestResponse Source # 
Data SuggestResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SuggestResponse -> c SuggestResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SuggestResponse #

toConstr :: SuggestResponse -> Constr #

dataTypeOf :: SuggestResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SuggestResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SuggestResponse) #

gmapT :: (forall b. Data b => b -> b) -> SuggestResponse -> SuggestResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SuggestResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SuggestResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> SuggestResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SuggestResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SuggestResponse -> m SuggestResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SuggestResponse -> m SuggestResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SuggestResponse -> m SuggestResponse #

Read SuggestResponse Source # 
Show SuggestResponse Source # 
Generic SuggestResponse Source # 
NFData SuggestResponse Source # 

Methods

rnf :: SuggestResponse -> () #

type Rep SuggestResponse Source # 
type Rep SuggestResponse = D1 (MetaData "SuggestResponse" "Network.AWS.CloudSearchDomains.Suggest" "amazonka-cloudsearch-domains-1.4.5-1i0V9nIH6kwCncgjgJLojl" False) (C1 (MetaCons "SuggestResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_srsSuggest") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe SuggestModel))) ((:*:) (S1 (MetaSel (Just Symbol "_srsStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe SuggestStatus))) (S1 (MetaSel (Just Symbol "_srsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)))))

Response Lenses

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

Container for the matching search suggestion information.

srsStatus :: 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 ).

srsResponseStatus :: Lens' SuggestResponse Int Source #

  • - | The response status code.