Search hub for Coveo Hive search interfaces (legacy)
Search hub for Coveo Hive search interfaces (legacy)
|
Legacy feature
This article pertains to the Coveo Hive framework which is now in maintenance mode. Choose one of Coveo’s more modern, lightweight, and responsive libraries for any future search interface development. See the search interface Implementation guide for more details. |
Setting the Search Hub
By default, when you don’t specify a Search Hub
value in a Coveo Hive search interface, Coveo for Sitecore sets a default value.
For example:
-
When you insert the Coveo for Sitecore Analytics rendering in a Coveo Search Interface and don’t specify a value in the Coveo for Sitecore Analytics data source
Search Hub
field, Coveo for Sitecore sets theSearch Hub
to the name of the search page item. -
When you insert the Coveo Global Searchbox rendering in an article header and don’t specify a value in the Coveo Global Searchbox data source
Override search hub
field, Coveo for Sitecore sets theSearch Hub
value used for the global search box query suggestion calls to the name of the search page item the global search box redirects its queries to.
Hence, specifying custom search hub values in some data source fields and leaving some others blank breaks the analytics-search search hub matches you need to fully leverage machine learning.
|
Leading practice
Specify custom search hub values in all data sources which contain search hub value fields to ensure meaningful search hub names and analytics-search search hub matches. |
Setting the Search Hub In a Multi-Rendering Coveo Hive Search Page
Whether you build a Coveo Hive search page one rendering at a time or fast-track your way to a multi-rendering search page by inserting an Example Search Page, you need to insert the Coveo for Sitecore Analytics rendering in your Sitecore search page item.
You set the Search Hub
value in the Coveo for Sitecore Analytics data source.

Setting the Search Hub In a Coveo Hosted Search Page
Coveo Hive supports integrating a Coveo search page in a Sitecore item through the Example Hosted Search Page branch template.
When you insert a branch from this template, a data source item is added as the deepest child of the branch.
This data source contains the Search Hub
field.

Setting the Search Hub In a Global Search Box
You may want to insert a Coveo Global Searchbox rendering in your website article headers and have this global search box provide query suggestions as the user types.
Set the Override search hub
value in the Coveo Global Searchbox data source to match the search hub value of the search interface whose query suggestions you want to use.

Setting the Search Hub When Using Server-Side Code to Call the Search API
Surfacing index data using direct server-side calls to the Search API should be done parsimoniously. This method not only involves writing code but it also doesn’t log usage analytics search events.
If you’re going to use this approach, you should tag your searches using the SearchHub
property of the Coveo.Framework.SearchService
framework QueryParams
class, as illustrated in the Calling the Coveo Search API Using Server-Side Code code sample.
This lets you either leverage machine learning acquired by the model associated with the given search hub or track your search consumption on a dedicated search hub name.