Skip to content

Query Suggestions

Sarah Dayan edited this page Jul 28, 2020 · 2 revisions

Query Suggestions let you display a list of relevant queries that your users can select from as they type.

suggestionsIndex

object

Your Algolia Query Suggestions index:

Key Type Description
indexName string Your Algolia index name.
searchParameters SearchParameters The search parameters to use.

Example:

export const suggestionsIndex = {
  indexName: 'instant_search_demo_query_suggestions',
  searchParameters: {
    hitsPerPage: 6,
  },
};

The Query Suggestions index is used to display suggestions below the search box and in the "no results" page.

Make sure you have access to Query Suggestions on your Algolia plan.