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

Query Suggestions FAQ for InstantSearch.js

Do Query Suggestions search and indexing operations count towards usage?

  • Plans don’t count any operations generated while building suggestions indices towards usage.
  • Plans do count searches made in the Browse section of your Algolia dashboard and any other searches made outside of the generation process towards usage. For example, any searches your users make in an autocomplete that uses Query Suggestions count towards your usage.

If you set up your Algolia plan before July 1, 2020, contact the Algolia support team to determine if Query Suggestions operations count towards usage.

Do records in Query Suggestions indexes count towards usage?

Yes.

Is there a limit to the number of Query Suggestions index configurations?

You can create up to 100 Query Suggestion configurations per app.

Is there a limit to the number of suggestions based on facet values?

When generating suggestions based on facet data, the Query Suggestions builder fetches a maximum of 1,000 values per facet. That means suggestions based on facets with high cardinality may only include some facet values. The builder also vets suggestions generated by facet values by ensuring that they fetch results and meet other configuration options.

Why do facet-based suggestions have a popularity score of zero?

The popularity score is based on how frequently users searched with a particular query in the last 30 days. Since the Query Suggestions builder generates these suggestions based on facet data alone, it can’t calculate such a metric. This is one reason to only use this suggestion generation method if you have neither Algolia Analytics nor external analytics to rely on.

Why don’t suggestions added with external analytics have the expected popularity?

When calculating popularity, the Query Suggestions builder considers a suggestion’s associated count. If the suggestion exists in Algolia Analytics and the external analytics, the builder sums the count from both sources.

The Query Suggestions builder calculates the Algolia Analytics count per userToken and includes the count from normalized versions of the suggestion. Because of this, it can be difficult to predict what a suggestion’s popularity will be.

It would help boost or reduce a suggestion’s popularity if you modified the external analytics suggestion count.

Can the same source index be used in multiple Query Suggestions configurations?

You can create different Query Suggestions indices based on the same source index. You may take this approach if you want to use different ranking strategies in different scenarios and if you use analyticsTags to create different suggestions for different use cases, for example, for mobile versus desktop users.

How to create “localized” Query Suggestions?

Yes. You can create different suggestions for users in different regions. If so, and you are already using different indices for the different regions, you can use these indices as sources for localized suggestions indices. For example, suppose you have a products_es_us index for the United States and products_es_mx, products_es_cl, indices for Mexico and Chile. In that case, use the different indices to generate separate suggestions indices based on these indices’ records and analytics.

If you have only one index serving many different regions, use analyticsTags to tag searches from different regions. Then you can create separate Query Suggestions indices filtered by the analyticsTags.

Can Query Suggestions be personalized for individual users?

Yes, as long as you have a working Personalization implementation, you can enable personalized Query Suggestions from the dashboard. Please refer to the guide on Personalizing Query Suggestions for implementation details.

You have several options. For example, you could create a standalone autocomplete that leads to a results page when users select a suggestion. For a richer UI, create a federated search experience that incorporates suggestions along with results and categories. The building a Query Suggestions UI guide will help you get started.

How to update Query Suggestions?

Query Suggestions automatically updates your suggestions index once a day, every day. You can also kick off a rebuild by saving your Query Suggestions index configuration, even if you need to change it later. If there is already a current build underway, the Query Suggestions builder stops this build and starts a new one.

Why do edits made to the Query Suggestion records keep disappearing?

The builder updates Query Suggestions indices once a day. The update overwrites any manual edits if you have manually edited your suggestions in the dashboard or using an API client. If you want to customize your suggestions by adding new suggestions or changing the popularity score, you can use external analytics instead. If you want to remove a suggestion, add it to the Banned expressions list.

Why aren’t new Query Suggestions appearing on the dashboard?

The Query Suggestions builder starts to build the index when you save a new configuration. Depending on the source index’s size, the amount of Search Analytics it has, and the additional sources you’ve added: this can take up to a few hours. You can see the Status of a Query Suggestions index at the top of its Query Suggestions configuration page.

Can the Query Suggestions feature be used in Magento integrations?

By default, Magento implementations rely on Magento-generated suggestions. Refer to the guide implementing Query Suggestions with the Magento integration.

Can the Query Suggestions feature be used in Shopify integrations?

Yes. You can set up a Query Suggestions index based on your Shopify products index’s analytics. You can then customize the Shopify frontend to include suggestions from this index in the autocomplete menu.

Did you find this page helpful?