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

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@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 #

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 #

Container for the parameters to the Suggest request.

See: suggest smart constructor.

Instances

Eq Suggest # 

Methods

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

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

Data Suggest # 

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 # 
Show Suggest # 
Generic Suggest # 

Associated Types

type Rep Suggest :: * -> * #

Methods

from :: Suggest -> Rep Suggest x #

to :: Rep Suggest x -> Suggest #

Hashable Suggest # 

Methods

hashWithSalt :: Int -> Suggest -> Int #

hash :: Suggest -> Int #

NFData Suggest # 

Methods

rnf :: Suggest -> () #

AWSRequest Suggest # 

Associated Types

type Rs Suggest :: * #

ToHeaders Suggest # 

Methods

toHeaders :: Suggest -> [Header] #

ToPath Suggest # 

Methods

toPath :: Suggest -> ByteString #

ToQuery Suggest # 
type Rep Suggest # 
type Rep Suggest = D1 * (MetaData "Suggest" "Network.AWS.CloudSearchDomains.Suggest" "amazonka-cloudsearch-domains-1.6.0-EiPx6Fpyuqd5FHvu22wh7D" 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 # 

Request Lenses

sSize :: Lens' Suggest (Maybe Integer) #

Specifies the maximum number of suggestions to return.

sQuery :: Lens' Suggest Text #

Specifies the string for which you want to get suggestions.

sSuggester :: Lens' Suggest Text #

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

Destructuring the Response

suggestResponse #

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 #

Contains the response to a Suggest request.

See: suggestResponse smart constructor.

Instances

Eq SuggestResponse # 
Data SuggestResponse # 

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 # 
Show SuggestResponse # 
Generic SuggestResponse # 
NFData SuggestResponse # 

Methods

rnf :: SuggestResponse -> () #

type Rep SuggestResponse # 
type Rep SuggestResponse = D1 * (MetaData "SuggestResponse" "Network.AWS.CloudSearchDomains.Suggest" "amazonka-cloudsearch-domains-1.6.0-EiPx6Fpyuqd5FHvu22wh7D" 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 DecidedStrict) (Rec0 * Int)))))

Response Lenses

srsSuggest :: Lens' SuggestResponse (Maybe SuggestModel) #

Container for the matching search suggestion information.

srsStatus :: Lens' SuggestResponse (Maybe SuggestStatus) #

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

srsResponseStatus :: Lens' SuggestResponse Int #

  • - | The response status code.