About the Search Hub
About the Search Hub
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. |
The search hub is a key Coveo concept. Most topics pertaining to the search hub will only be tackled later, in the Achieve Relevance section. However, the goals of this article are to bring awareness to the importance of setting custom search hub values while building your search solution and to show you where to do so in your Coveo Hive rendering data sources.
Search Hub Basics
Requests to the Coveo Search API and the associated usage analytics events are tagged with a reference to the search interface the query originates from. That tag is called the search hub.
In requests to Coveo Usage Analytics (Coveo UA), the search hub value appears in the originLevel1
parameter.
In a Coveo Hive search interface, you have set the Search Hub
value to MainSearchPage
.
You type phone
in the search box and run the query.
The browser developer tools show two calls: the search API call and the call to Coveo Usage Analytics.
The search call shows the following headers:
The usage analytics call shows the following headers:
Search Hub Uses
The search hub value is a critical piece of information you need to set for search consumption tracking, analytics reporting, and Coveo Machine Learning (Coveo ML) model relevance effectiveness.
Note
When using the Coveo Atomic library, you set the search hub value using the atomic-search-interface component |
Monitoring Search Consumption
Your Coveo license defines a limit on the monthly number of Search API calls for your organization. Performing a keyword search counts against this quota, but other user actions also trigger Search API calls. Moreover, calls to the Search API can originate from various locations in your search solution, and even from the Coveo Administration Console. Your organization Consumption (platform-ca | platform-eu | platform-au) dashboard lets you monitor query usage on a per search hub basis.
Analytics Reporting
Content and search managers want to monitor the effectiveness of each of their search interfaces using metrics based on calls to Coveo Usage Analytics. In turn, they can use the insights derived from these metrics to carry out changes to their search interfaces, their query pipelines, or to the indexed content (see the articles in the Leverage Coveo Usage Analytics Coveo documentation section).
The Analytics section of the Coveo Administration Console navigation menu contains a wide array of reports and graphics, many of which you can filter on a search hub basis.
To get good analytics metrics, you need large amounts of good data. This is achieved by setting your search hub values early and properly.
Machine Learning Driven Features
Typical Coveo-powered search solutions include multiple search interfaces that may be used by different audiences and for different purposes. For example, a Coveo search solution may contain the following search interfaces:
-
A customer-facing community search page
-
An internal support agent Insight Panel
Since audience and audience intent differ on these two types of search interfaces, a given query shouldn’t yield the exact same results (and in the same order) on both. Indeed, when you properly set up your search solution to use Coveo Machine Learning, a model associated with the community search page will gather user behavior analytics far different from the ones gathered by a model associated with the support agent Insight Panel. That’s why Coveo separates ML models and sub-models based on the search hub value.
Whether for Automatic Relevance Tuning (ART), Query Suggestions (QS), or Dynamic Navigation Experience (DNE), the effectiveness of a Coveo ML model driven feature depends on the amount and quality of usage analytics data gathered, and that begins with properly setting your search hub values (see Leverage Machine Learning).
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.