setCustomRanking method
CustomRanking (Ranking)
Specifies the custom ranking criterion.
Each string must conform to the syntax asc(${attributeName}) or desc(${attributeName}) and specifies a (respectively) increasing or decreasing sort on an attribute. All sorts are applied in sequence by the tie-breaking algorithm in the order they are specified.
Modifiers:
- asc: Sort by increasing value of the attribute.
- desc: Sort by decreasing value of the attribute.
Source: Learn more
Implementation
AlgoliaSettings setCustomRanking(List<String> value) {
assert(value.isNotEmpty, 'value can not be empty');
assert(!_parameters.containsKey('customRanking'));
return _copyWithParameters(<String, dynamic>{'customRanking': value});
}