setRestrictSearchableAttributes method

AlgoliaQuery setRestrictSearchableAttributes(
  1. List<String> value
)

RestrictSearchableAttributes

Restricts a given query to look in only a subset of your searchable attributes.

This setting overrides searchableAttributes for specific searches.

Usage notes:

  • This setting is a query-level setting, affecting only the search that specifies it.
  • searchableAttributes must not be empty nor null for restrictSearchableAttributes to be applied.

Source: Learn more

Implementation

AlgoliaQuery setRestrictSearchableAttributes(List<String> value) {
  assert(value.isNotEmpty, 'value can not be empty');
  assert(!_parameters.containsKey('restrictSearchableAttributes'));
  return _copyWithParameters(
      <String, dynamic>{'restrictSearchableAttributes': value});
}