setSumOrFiltersScore method

AlgoliaQuery setSumOrFiltersScore(
  1. bool value
)

sumOrFiltersScores

Determines how to calculate the total score for filtering.

When using filter scoring to rank filtered records, you can control how scores are calculated.

Usage notes:

  • When sumOrFiltersScores is false, max score will be kept.
  • When sumOrFiltersScores is true, score will be summed.
  • Just to be clear: False means that the total score of a record is the maximum score of an individual filter. Setting it to true changes the total score by adding together the scores of each matched filter.

Source: Learn more

Implementation

AlgoliaQuery setSumOrFiltersScore(bool value) {
  assert(!_parameters.containsKey('sumOrFiltersScores'),
      'SumOrFiltersScores $value already exists in this query');
  return _copyWithParameters(<String, dynamic>{'sumOrFiltersScores': value});
}