Search hub for Coveo Hive search interfaces (legacy)

In this article
Warning
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 the Search 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 the Search 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.

Tip
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.

Image showing where to set search hub value in data source | Coveo

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.

Image showing data source of an Example Hosted Search Page branch | Coveo for Sitecore 5

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.

Image showing override search hub field in global searchbox data source | Coveo for Sitecore 5

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.