setDisablePrefixOnAttributes method
DisablePrefixOnAttributes
List of attributes on which you want to disable prefix matching.
This setting is useful on attributes that contain strings that should not be matched as a prefix (for example a product SKU). By creating a list of optional words, you are also matching records that match only some of the words.
Usage notes:
- The list must be a subset of the
searchableAttributes
index setting. - searchableAttributes must not be empty nor null for disablePrefixOnAttributes to be applied.
Source: Learn more
Implementation
AlgoliaQuery setDisablePrefixOnAttributes(List<String> value) {
assert(value.isNotEmpty, 'value can not be empty');
assert(!_parameters.containsKey('disablePrefixOnAttributes'));
return _copyWithParameters(
<String, dynamic>{'disablePrefixOnAttributes': value});
}