setAttributeForDistinct method
attributeForDistinct
Name of the de-duplication attribute to be used with the distinct feature
Usage notes:
- You can define only one attribute for distinct.
- It must be done at indexing time; it cannot be defined or overridden at query time.
Source: Learn more
Implementation
AlgoliaQuery setAttributeForDistinct(String value) {
assert(value.isNotEmpty, 'value can not be empty');
assert(!_parameters.containsKey('attributeForDistinct'));
return _copyWithParameters(
<String, dynamic>{'attributeForDistinct': value});
}