setPersonalizationImpact method

AlgoliaQuery setPersonalizationImpact({
  1. required int value,
})

PersonalizationImpact

Define the impact of the Personalization feature.

The personalizationImpact parameter sets the percentage of the impact that personalization has on ranking records.

This is set at query time and therefore overrides any impact value you had set on your index. The higher the personalizationImpact, the more the results are personalized for the user, and the less the custom ranking is taken into account in ranking records.

Usage notes:

  • The value must be between 0 and 100 (inclusive).
  • This parameter isn’t taken into account if enablePersonalization is false.
  • Setting personalizationImpact to 0 disables the Personalization feature, as if enablePersonalization were false.

Source: Learn more

Implementation

AlgoliaQuery setPersonalizationImpact({required int value}) {
  assert(!_parameters.containsKey('personalizationImpact'));
  return _copyWithParameters(
      <String, dynamic>{'personalizationImpact': value});
}