Managing Top Result Items in Sitecore
With Coveo Cloud, Top Results have been renamed Featured Results and are managed from the Query Pipelines. See Adding and Managing Query Pipeline Featured Results.
Since Top Results can be configured using standard Sitecore items, it is quite easy to manage.
- Navigate to the
Top Resultsfolder. The default path is
- Right-click on the folder and create a Top Results item.
- Give the new item a meaningful name. The Queries field is filled automatically with the name of the top result.
The Items field allows you to select which items need to appear first in the results list. The items appears in the same order as those defined in the field.
You have to enter a value in both the Queries and Items fields. Otherwise, your item will not be synchronized.
In this example, there is one top result with the query
designwhich presents two items. The first one is a sports car, and the second one is a luxury car.
You can modify and remove Top Results as you would do with any other Sitecore item. You can also clone and duplicate Top Results items.
When searching the website with the
designquery, you can see that the selected items appear in the right order.
A Coveo Search Page allows the sorting of results according to many criteria (e.g., by relevancy, by date,or by a specific field). Since Top Results are essentially a way to improve the ranking of specific search results, they are only considered when results are sorted by Relevancy.
A Word About Item Versions
Sitecore items can be versioned in two different ways: numbers and languages. Here is how they are both supported by Coveo for Sitecore.
Top Result template looks like this.
As you can see, the TopResultDocuments field (entitled Items) is configured as Public. It means that, for a top result, the field value will always be the same no matter if a numbered or language version is used. On the other hand, the TopResultQueries field (entitled Queries) is a regular field; its value can change according to number and language versions.
This allows for a better support of localized Top Results. It also allows you to add a language version without having to reconfigure which items should show up in the search page and in what order. The items list is always the same, and the synchronization mechanism takes care of matching the items language with the top result language. Number versions are not a concern either, as the synchronization mechanism automatically uses the latest version of the top result and referenced items.
Publishing Top Results
As you probably know, Coveo for Sitecore uses different indexes for each Sitecore database. Even if the top result configuration is global in CES, Top Results are still independent by database and language. It means that you need to publish the top results and they need to be synchronized before it can affect the user search on the public website.
- You can now proceed to Synchronizing Top Results Automatically.