API Reference / API Parameters / enableReRanking
Type: boolean
Engine default: true
Parameter syntax
'enableReRanking' => true|false

Can be used in these methods:

About this parameter

Whether this search will use Dynamic Re-Ranking.

Usage notes

This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.

Set enableReRanking to false to turn off Dynamic Re-Ranking for a search query.

When A/B testing with Dynamic Re-ranking, be aware that enableReRanking overwrites the A/B testing group.

  • When enableReRanking is true, users are placed in the re-ranked group.
  • When enableReRanking is false, users are removed from the re-ranked group.

This can lead to issues in A/B test comparisons as the presence or absence of Dynamic Re-ranking will affect the test results. Avoid this problem by keeping enableReRanking consistent across both A/B test variants.

Examples

Turn off re-ranking

1
2
3
$results = $index->search('query', [
  'enableReRanking' => false
]);
Did you find this page helpful?