Guides
/
Building Search UI
/
UI & UX patterns
/
Query Suggestions
May. 07, 2024
Personalize Query Suggestions
If you enable Personalization on the Query Suggestions index, Algolia will suggest different queries to different users based on their past interactions with your site or app. For example, if a user has shown interest in basketball or boxing in the past, Algolia may be more likely to suggest queries related to those sports:
The prominence of these suggestions depends on the:
- Initial position of the suggestion
- User’s affinities scores
- Personalization impact settings.
Enable Personalized Query Suggestions
To turn on Personalized Query Suggestions, you need:
- A Personalization setup).
- To activate Personalized Query Suggestions in the Query Suggestions index’s Algolia dashboard settings.
- To pass the user’s
userToken
when they Query Suggestions index. Without this, Algolia doesn’t know which user’s affinity profile to use to personalize suggestions.
How Personalized Query Suggestions work
After enabling this feature, Algolia:
- Queries the source index to fetch the top 20 associated facet values (based on your personalization strategy).
- Adds a new attribute to records in the Query Suggestions index for each facet defined in your personalization strategy and adds the retrieved facet values.
- Configures the Query Suggestions index to ensure the
attributesForFaceting
align with your personalization strategy. - Activates personalization by setting
enablePersonalization
totrue
in the Query Suggestions index.
Did you find this page helpful?