> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable Dynamic Re-Ranking on category pages

> Use Dynamic Re-Ranking to re-rank and promote popular products on category pages.

export const SearchQuery = () => <Tooltip tip="The text users enter into a search box. In the Search API, this corresponds to the query parameter. A search query is often used with filters, facets, and other parameters, but these aren't part of the query text itself.">
    search query
  </Tooltip>;

export const Records = () => <Tooltip tip="A record is a searchable object in an Algolia index. Each record consists of named attributes." cta="Algolia records" href="/doc/guides/sending-and-managing-data/prepare-your-data#algolia-records">
    records
  </Tooltip>;

export const Index = () => <Tooltip tip="An Algolia index is a searchable dataset that consists of records and configuration settings. These settings define how the records are searched and ranked.">
    index
  </Tooltip>;

export const Filter = () => <Tooltip tip="A filter is a condition that limits which records Algolia returns. Filters often use one or more facet-value pairs, such as brand:Apple AND color:red. You can also filter by numeric values, dates, tags, booleans, or geographic constraints." cta="Filtering" href="/doc/guides/managing-results/refine-results/faceting">
    filter
  </Tooltip>;

You can use [Dynamic Re-Ranking](/doc/guides/algolia-ai/re-ranking) to detect trends in your users' behavior.
Based on their search and browse interactions,
Dynamic Re-Ranking boosts trending or popular results to improve relevance on category pages.

Once you've configured your category pages and sent [click and conversion events](/doc/guides/sending-events/getting-started) to Algolia,
Dynamic Re-Ranking uses this data to identify trends.
You don't need to write any code to enable Dynamic Re-Ranking on category pages.

<img src="https://mintcdn.com/algolia/uAYFrBCMSmYQz381/images/guides/solutions/solutions-browse-reranking-dashboard-screen.jpg?fit=max&auto=format&n=uAYFrBCMSmYQz381&q=85&s=bd7380be4a0562af6f7dfc9ffaa8a460" alt="Screenshot of the Dynamic Re-Ranking page showing the 'Re-Ranking Simulator' with two sets of ranked jeans products and their 'Attractiveness' scores." width="2560" height="1478" data-path="images/guides/solutions/solutions-browse-reranking-dashboard-screen.jpg" />

<Callout icon="credit-card" color="#c084fc">
  This feature isn't available on every plan.
  Refer to your [pricing plan](https://www.algolia.com/pricing) to see if it's included.
</Callout>

## Before you begin

Create [category pages](/doc/guides/solutions/ecommerce/browse/tutorials/category-pages) before enabling Dynamic Re-Ranking.

## Enable Dynamic Re-Ranking on category pages

Set the following options in the [Dynamic Re-Ranking page in the dashboard](https://dashboard.algolia.com/reranking/):

* **Events source index.** Select the <Index /> that receives your click and conversion events.

  You can also select an alternative source index.
  This is helpful if you have a staging index that replaces the production index every day for atomic reindexing.
  In this case, enable re-ranking on both the staging and production indices as source events, given that the production index already receives events.

* **Browsing facets.** Set this to the category page identifier in your index, such as `collections`, `categories`, or `categoryPageId`.

  Check with your team to make sure the browsing <Filter /> is referencing the correct filter used in the <SearchQuery /> to generate the category page in the frontend UI.

* **(Optional) Event freshness.** [Event freshness](/doc/guides/algolia-ai/re-ranking#give-more-weight-to-recent-events-event-freshness) gives more weight to recent events to account for seasonality and short-term trends. This setting is on by default, and in most cases, you should keep it enabled.

* **(Optional) Re-Ranking filter.** You can turn off re-ranking for specific <Records /> to prevent promoting popular items that are out of stock or no longer listed. To do this, select a filter value, for example `instock=true`.

  <img src="https://mintcdn.com/algolia/uAYFrBCMSmYQz381/images/guides/solutions/solutions-browse-reranking-activate-screen.jpg?fit=max&auto=format&n=uAYFrBCMSmYQz381&q=85&s=723630bb84fa2a21fdc1a661d30f7abc" alt="Screenshot of a form with a 'Re-Ranking Filter' field set to a stock status attribute, an 'is' operator, and a value of 'true'." width="1280" height="342" data-path="images/guides/solutions/solutions-browse-reranking-activate-screen.jpg" />

## Turn on Dynamic Re-Ranking

To turn the feature on,
click **Activate Re-Ranking** from the [Dynamic Re-Ranking page in the dashboard](https://dashboard.algolia.com/reranking/).

<img src="https://mintcdn.com/algolia/uAYFrBCMSmYQz381/images/guides/solutions/solutions-browse-reranking-activate-button.jpg?fit=max&auto=format&n=uAYFrBCMSmYQz381&q=85&s=9f27f1c3edaad445fe99f486841e6b70" alt="Screenshot of the 'Activate Re-Ranking' button in the Dynamic Re-Ranking interface." width="1280" height="114" data-path="images/guides/solutions/solutions-browse-reranking-activate-button.jpg" />

Dynamic Re-Ranking refreshes each query's ranking every 24 hours.
It always takes the last 30 days into account,
meaning it's based on a sliding window of the most recent analytics data.

<Note>
  You can see re-ranked results only after Algolia has received enough search traffic and click and conversion events.
  To be promoted for a given query, a record must receive **at least 20 clicks or two conversions within the 30-day window.**
</Note>

## A/B test Dynamic Re-Ranking on category pages

To ensure accurate measurement,
launch your A/B test from the Dynamic Re-Ranking page in the dashboard:
not from the dashboard's A/B test page.
This applies the configuration as intended and limits results to category pages with enough traffic.

<img src="https://mintcdn.com/algolia/uAYFrBCMSmYQz381/images/guides/solutions/solutions-browse-reranking-abtest.jpg?fit=max&auto=format&n=uAYFrBCMSmYQz381&q=85&s=379fc1a71a4737c056042be379f41d1b" alt="Screenshot of Dynamic Re-Ranking screen for A/B test" width="833" height="720" data-path="images/guides/solutions/solutions-browse-reranking-abtest.jpg" />

## See also

* [Dynamic Re-Ranking's effect on relevance](/doc/guides/algolia-ai/re-ranking#effect-on-relevance).
* [Send click and conversion events with InstantSearch.js](/doc/guides/building-search-ui/events/js).
* [Choose how to send events](/doc/guides/sending-events/getting-started).
* [Security best practice on sending click and conversion events](/doc/guides/algolia-ai/re-ranking#security).
