Guides / Building Search UI / UI & UX patterns / Query Suggestions

Personalize Query Suggestions

As of May 1st, 2024, Apple requires all iOS apps to include a privacy manifest. Ensure you incorporate our provided privacy manifest files into your documentation. For more details, see Privacy Manifest.

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:

Personalized qs example

The prominence of these suggestions depends on the:

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:

  1. Queries the source index to fetch the top 20 associated facet values (based on your personalization strategy).
  2. 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.
  3. Configures the Query Suggestions index to ensure the attributesForFaceting align with your personalization strategy.
  4. Activates personalization by setting enablePersonalization to true in the Query Suggestions index.
Did you find this page helpful?