Query Suggestions

The Query Suggestions (QS) feature leverages Coveo Usage Analytics (Coveo UA) to propose queries to users as they type in the search box. Clicking a suggestion completes the query and sends it to the index.

When QS is enabled, Coveo for Sitecore doesn’t generate any queries against your index as the user types. Therefore, this feature doesn’t have any impact on your query per month usage.

How the Suggested Queries are Determined

The relevance score of each query suggestion is established based on query frequency and performance, as well as the degree to which the typed characters match the query (see About Query Suggestions).

Enabling Query Suggestions

When you include the Coveo Searchbox component in a Coveo for Sitecore search interface, the Enable Coveo Machine Learning query suggestions option in the data source is set to use the default enableQuerySuggestAddon setting of the Omnibox component (see Coveo JavaScript Search Framework Omnibox Component). Since that default value is true, you have nothing to do to enable the feature.

However, a Coveo Machine Learning (Coveo ML) QS model has to be created and configured, and a minimum amount of usage analytics data needs to be collected before the Coveo Searchbox component actually begins suggesting queries.

To enable QS in your search interface

  1. Open your search page in the Sitecore Experience Editor.

  2. If not already done, add a Coveo Searchbox component to your interface (see Add a Search Box Component).

  3. If not already done, add the Coveo for Sitecore Analytics component to your search interface.

    1. Locate and select the UI Header placeholder.

    2. Click Add here.

    3. Select the Coveo for Sitecore Analytics component and click Select.

    4. Create or select a data source for your Coveo for Sitecore Analytics component.

  4. Save and publish your search page.

  5. In the Coveo Cloud Administration Console, create a QS machine learning model for the query pipeline with which your search interface is associated (see Using a Query Pipeline).

  6. Collect sufficient usage analytics data for the search box to begin suggesting queries (see Prerequisites).