This feature isn’t available on every plan.
Refer to your pricing plan to see if it’s included.
optionalFilters.
This can become time-consuming because trends come and go.
A better, more scalable approach is to use the Dynamic Re-Ranking feature.
What is Dynamic Re-Ranking?
Dynamic Re-Ranking is an Algolia feature that uses AI to detect trends in user behavior. It learns from click and conversion events for a given and can promote records that are becoming more popular. Dynamic Re-Ranking only reorders records that pass textual relevance and your filters. For example, if users increasingly choose surgical masks when searching for “mask”, Dynamic Re-Ranking can move surgical masks higher in future results. This can improve relevance and increase without requiring rules or manual changes. For more information, see Merchandising Playbook: AI re-rankingHow Dynamic Re-Ranking works
Learn when Dynamic Re-Ranking can reorder results, how ranking works, and how it interacts with Personalization.Effect on relevance
Dynamic Re-Ranking runs after Algolia has built the result set using textual relevance, filters, and custom ranking. However, there are some constraints on the feature:- Dynamic Re-Ranking only reorders that are already eligible to appear in the results (it doesn’t add new records).
- Most Rules consequences (such as boosting or burying categories) run before Dynamic Re-Ranking.
- Pin and hide consequences run after Dynamic Re-Ranking, so pinned records stay in place and hidden records don’t appear.
- Textual ranking criteria
- Custom ranking
- Personalization (if you’ve enabled it and Algolia has enough information to personalize results for a particular user)
- Rules (boosting and burying) or Automatic Boosting from Query Categorization
- Dynamic Re-Ranking
- Rules (pinning and hiding specific items).
By default,
Algolia doesn’t apply Dynamic Re-Ranking to empty searches but you can
enable re-ranking for empty searches filtered on a particular facet value.
Allow Dynamic Re-Ranking when Personalization applies
By default, Dynamic Re-Ranking doesn’t run if Personalization reorders results on the first page for that user. To enable Dynamic Re-Ranking even when Personalization affects the first page of results, setallowReRankingOnPersonalization to true at query time.
JSON
Dynamic Re-Ranking doesn’t apply when
distinct > 1,
even if allowReRankingOnPersonalization is true.Set distinct to 0 or 1 to use Dynamic Re-Ranking with Personalization.Dynamic Re-Ranking preparation
Before you enable Dynamic Re-Ranking, make sure you send the right events and meet the data requirements.Send the required click and conversion events
To use Dynamic Re-Ranking, you must send click and conversion events. Dynamic Re-Ranking uses this data to detect trends and adjust ranking accordingly. Dynamic Re-Ranking may work with only click events (not conversion events) but performs better if you send both click and conversion events. Dynamic Re-Ranking refreshes the ordering for each query every 24 hours by default. It uses a sliding 30-day window of recent analytics data. To promote a record for a given query, Dynamic Re-Ranking needs at least 20 clicks or two conversions for that record during the 30-day window. Events must contain aqueryID property that corresponds to a valid search.
For each query and record (objectID), Dynamic Re-Ranking counts at most one click and one conversion per userToken.
If the userToken in the event differs from the userToken in the search request, Dynamic Re-Ranking uses the search userToken.
Events must include an objectID property for a record in the specified index.
This objectID needs to belong to one of the returned records of the search with the specified queryID.
For example:
- On the first day of the month, a search returns record
X. - Your app sends an event for record
Xin the production index with the correspondingqueryID. - Dynamic Re-Ranking uses record
Xin its next ordering computation. - On the fifth day of the month, your app deletes record
Xfrom the production index. - Dynamic Re-Ranking stops using record
Xin future ordering computations.
Security
To prevent malicious users from manipulating the ranking of your records, Dynamic Re-Ranking counts at most one click and one conversion peruserToken for a given user, query, and record.
For a given user-query-record combination, Dynamic Re-Ranking counts at most one click and one conversion per userToken.
For example, if the same user (same userToken) clicks on the same record 100 times after the same query, it counts as one click.
If the same user clicks on the same record after different queries, they count as separate events.
Validate with the simulator
Simulate re-ranking for any from the Dynamic Re-Ranking page in the dashboard. Once you’ve sent enough click and conversion events, try out any query and see how Dynamic Re-Ranking affects the results (without activating re-ranking on your live index).
If you use rules to pin top records for popular queries,
Dynamic Re-Ranking has less impact because pinned records stay in place.
Dynamic Re-Ranking settings
Configure the following settings from the Dynamic Re-Ranking page in the dashboard.General settings
General settings control the goal, event source, and refresh frequency.Goal
Goal
This feature isn’t available on every plan.
Refer to your pricing plan to see if it’s included.
price, quantity, and currency for each purchased item.
Dynamic Re-Ranking optimizes revenue for the currency that appears most often in an index’s events and ignores events in other currencies.Events source index
Events source index
By default, Dynamic Re-Ranking uses the events sent to the re-ranked index.
You can use another index as the source of the events by changing the Events source index option.
The indices must be replicas of each other.Use this parameter to experiment with your Dynamic Re-Ranking configuration without affecting production search results:
- Create a replica of your production index
- Enable Dynamic Re-Ranking on the replica
- Set the event source index to your production index to use its events to generate the replica’s re-ranking, which would otherwise be empty because the replica has no events
- Test changes to your Dynamic Re-Ranking configuration in the simulator on the replica
- Start an A/B test by comparing your production index with the replica
Refresh every hour
Refresh every hour
This feature isn’t available on every plan.
Refer to your pricing plan to see if it’s included.
Coverage settings
Coverage settings determine which queries Dynamic Re-Ranking can affect and the number of results it can reorder.Multi-Signal Ranking
Multi-Signal Ranking
This feature isn’t available on every plan.
Refer to your pricing plan to see if it’s included.
brand, price, and category.id are good candidates but SKU, imageURL, or margin aren’t.The attributes must be booleans, numbers, strings, or lists.
Objects aren’t supported.
You can mark each attribute as:datefor numbers expressed as a Unix timestamp.categoryfor string or number values shared across your records. Good examples arebrandandcolor. Don’t usecategoryfor unique fields likeproductDescriptionortitle.unclassifiedfor anything else.
isOutOfStock can be negative because out of stock items aren’t desirable.
Multi-Signal Ranking learns to demote attributes with a negative impact.Enable re-ranking on browsing pages (Browsing Facet)
Enable re-ranking on browsing pages (Browsing Facet)
By default, Algolia doesn’t dynamically re-rank empty queries.
Setting a Browsing Facet re-ranks empty queries that include facet filters
(either with the
facetFilters or filters parameter)
for that attribute.For example, if you use Algolia to populate your website’s category pages by performing an empty query with a categoryPageID facet, set categoryPageID as a browsing facet.
Re-ranking reorders records in each categoryPageID based on their popularity.If you set the root of a nested faceting attribute as a browsing facet, Dynamic Re-Ranking reorders all its sub-attributes.
For example, if you have an attribute named hierarchicalCategories with several nested levels (like hierarchicalCategories.level0 and hierarchicalCategories.level1), using only hierarchicalCategories as a browsing facet re-ranks empty queries filtered on hierarchicalCategories.level0 and hierarchicalCategories.level1 as well.Set up to five browsing facets if your plan includes Advanced Dynamic Re-Ranking.
Otherwise, you can use only one browsing facet.
Enable re-ranking on empty query by default
Enable re-ranking on empty query by default
This feature isn’t available on every plan.
Refer to your pricing plan to see if it’s included.
Re-rank more results per query (Re-ranked Hits)
Re-rank more results per query (Re-ranked Hits)
You can increase the number of records at the top of search results from the default of 20 to 100.
Dynamic Re-Ranking may promote fewer results than this value if Dynamic Re-Ranking doesn’t gather significant traffic on enough records for some queries, or if filters remove records that were about to be re-ranked.
Ordering settings
Ordering settings control how Dynamic Re-Ranking weighs events and shares signals across similar queries.Give more weight to recent events (event freshness)
Give more weight to recent events (event freshness)
To give more weight to recent events in the ranking computation, enable the Event Freshness option.
Otherwise, an event from four weeks ago affects re-ranking the same way as one from yesterday.”
Enabling event freshness better handles seasonality and shorter search trends.
Group similar queries
Group similar queries
By default, each query is re-ranked independently.
Group Similar Queries helps to re-rank less frequent query variations.Dynamic Re-Ranking groups queries that contain the same words, in any order.Setting a language for grouping allows Dynamic Re-Ranking to ignore plurals, conjugations, and stop words during the grouping phase.Grouped queries share events and therefore use the same ordering.
Turn off re-ranking for specific records (re-ranking filters)
Turn off re-ranking for specific records (re-ranking filters)
If you set a re-ranking filter, Dynamic Re-Ranking only promotes records matching the configured filters.For example, if you select
inStock = true, Dynamic Re-Ranking only promotes items that are in stock.Enable Dynamic Re-Ranking for production
Enable Re-Ranking on the Dynamic Re-Ranking page in the dashboard. Choose the index you want to activate re-ranking for and select Activate Re-Ranking.A/B test Dynamic Re-Ranking
Use A/B testing to measure how Dynamic Re-Ranking affects search performance on your index. To create an A/B test from the Dynamic Re-Ranking page in the dashboard, select Launch an A/B test in the top-right corner. This lets you choose the traffic split and duration to compare search performance with and without Dynamic Re-Ranking.Turn off Dynamic Re-Ranking for specific queries
To turn Dynamic Re-Ranking off for a specific query, create a rule with{"enableReRanking": false} as a consequence.