Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data Suggest = Suggest' {}
- newSuggest :: Text -> Text -> Suggest
- suggest_size :: Lens' Suggest (Maybe Integer)
- suggest_query :: Lens' Suggest Text
- suggest_suggester :: Lens' Suggest Text
- data SuggestResponse = SuggestResponse' {}
- newSuggestResponse :: Int -> SuggestResponse
- suggestResponse_suggest :: Lens' SuggestResponse (Maybe SuggestModel)
- suggestResponse_status :: Lens' SuggestResponse (Maybe SuggestStatus)
- suggestResponse_httpStatus :: Lens' SuggestResponse Int
Creating a Request
Container for the parameters to the Suggest
request.
See: newSuggest
smart constructor.
Instances
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.
$sel:query: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.
SuggestResponse' | |
|
Instances
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:suggest:SuggestResponse'
, suggestResponse_suggest
- Container for the matching search suggestion information.
$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:httpStatus:SuggestResponse'
, suggestResponse_httpStatus
- The response's http status code.
Response Lenses
suggestResponse_suggest :: Lens' SuggestResponse (Maybe SuggestModel) Source #
Container for the matching search suggestion information.
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_httpStatus :: Lens' SuggestResponse Int Source #
The response's http status code.