updateDefaultSearchField method
Configures the default search field for the search domain. The default search field is the text field that is searched when a search request does not specify which fields to search. By default, it is configured to include the contents of all of the domain's text fields.
May throw BaseException. May throw InternalException. May throw InvalidTypeException. May throw ResourceNotFoundException.
Parameter defaultSearchField
:
The text field to search if the search request does not specify which
field to search. The default search field is used when search terms are
specified with the q
parameter, or if a match expression
specified with the bq
parameter does not constrain the search
to a particular field. The default is an empty string, which automatically
searches all text fields.
Implementation
Future<UpdateDefaultSearchFieldResponse> updateDefaultSearchField({
required String defaultSearchField,
required String domainName,
}) async {
ArgumentError.checkNotNull(defaultSearchField, 'defaultSearchField');
ArgumentError.checkNotNull(domainName, 'domainName');
_s.validateStringLength(
'domainName',
domainName,
3,
28,
isRequired: true,
);
final $request = <String, dynamic>{};
$request['DefaultSearchField'] = defaultSearchField;
$request['DomainName'] = domainName;
final $result = await _protocol.send(
$request,
action: 'UpdateDefaultSearchField',
version: '2011-02-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['UpdateDefaultSearchFieldRequest'],
shapes: shapes,
resultWrapper: 'UpdateDefaultSearchFieldResult',
);
return UpdateDefaultSearchFieldResponse.fromXml($result);
}