Query Suggestions
Query Suggestions
Legacy feature
This article pertains to achieving relevance with the Coveo Hive framework. Coveo Hive is now in maintenance mode. See Achieve relevance for guidance on leveraging Coveo Platform relevance features with the Coveo Atomic library. |
The Query Suggestion (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.
Note
When the QS feature is enabled, Coveo for Sitecore doesn’t generate any queries against your index while the user is typing. Therefore, this feature doesn’t impact your query per month usage. |
How the Suggested Queries are Determined
The relevance score of each query suggestion is determined by the following:
-
The query frequency.
-
The degree to which the query suggestion matches the typed characters.
-
The query performance.
To summarize, in order to get relevant query suggestions, you need queries and clicks on query results (see About Query Suggestions).
A minimum amount of usage analytics data needs to be collected before the Coveo Searchbox component begins suggesting queries. |
Note
You can use the Coveo UA bot to batch simulate visits, queries, and clicks on a site. |
Enabling Query Suggestions
When you include the Coveo Searchbox rendering 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 Coveo JavaScript Search Framework Omnibox component.
Since that default value is true
, you should have nothing to do to enable the feature from a rendering configuration standpoint.
However, a Coveo Machine Learning (Coveo ML) QS model has to be created and configured.
To enable QS in your search interface
-
Open your search page in the Sitecore Experience Editor.
-
Add a Coveo Searchbox component to your interface, if not already done.
-
Add the Coveo for Sitecore Analytics component to your search interface, if not already done.
-
Locate and select the UI Header placeholder.
-
Click Add here.
-
Select the Coveo for Sitecore Analytics component and click Select.
-
Create or select a data source for your Coveo for Sitecore Analytics component.
-
-
Save and publish your search page.
-
In the Coveo Administration Console, create a QS machine learning model.
-
Collect enough usage analytics data for the search box to begin suggesting queries (see Prerequisites).