defineSuggester method
Future<DefineSuggesterResponse>
defineSuggester({
- required String domainName,
- required Suggester suggester,
Configures a suggester for a domain. A suggester enables you to display possible matches before users finish typing their queries. When you configure a suggester, you must specify the name of the text field you want to search for possible matches and a unique name for the suggester. For more information, see Getting Search Suggestions in the Amazon CloudSearch Developer Guide.
May throw BaseException.
May throw InternalException.
May throw InvalidTypeException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ValidationException.
Implementation
Future<DefineSuggesterResponse> defineSuggester({
required String domainName,
required Suggester suggester,
}) async {
final $request = <String, String>{
'DomainName': domainName,
for (var e1 in suggester.toQueryMap().entries)
'Suggester.${e1.key}': e1.value,
};
final $result = await _protocol.send(
$request,
action: 'DefineSuggester',
version: '2013-01-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DefineSuggesterResult',
);
return DefineSuggesterResponse.fromXml($result);
}