About the search hub

This is for:

Developer

The search hub is an important component in Coveo-powered search solutions. It’s used for tracking search consumption, usage analytics reporting, and enhancing the effectiveness of Coveo Machine Learning (ML) models.

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.

Example

In a Coveo-powered search interface, you have set the search hub value to MainSearchPage. You type Prometheus in the search box and run the query.

The browser developer tools show two calls: the search API call and the call to Coveo UA.

Search API and usage analytics calls in the developer tools | Coveo

The search call shows the following payload:

Search API call in the developer tools

The usage analytics call shows the following payload:

UA call in the developer tools

Search hub uses

Search hub values are central to search consumption monitoring, analytics reporting, and machine learning model effectiveness.

Search consumption monitoring

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. Your organization consumption dashboard lets you monitor query usage on a per search hub basis.

Consumption dashboard

Analytics reporting

By filtering search traffic based on the search hub, you can generate detailed analytics reports to understand how different search interfaces are performing. This helps identify areas for improvement and ensures that each interface is optimized for user engagement.

1 To filter an analytics report on a specific search hub value, use the Origin 1 (Page/Hub) dimension.

Admin console report

Machine learning model relevance

Coveo Machine Learning (Coveo ML) models, such as Automatic Relevance Tuning (ART), Query Suggestion (QS), and Content Recommendation (CR), rely on search hub data to adjust their algorithms and improve result relevance. This tagging allows the models to learn from user interactions within specific interfaces and contexts, making the search experience more tailored and effective.

Setting the search hub

To implement the search hub in your Coveo-powered search interface, follow these steps:

  1. Retrieve the search hub value from your configuration.

  2. Set the search hub value in the search interface component or API call.

  3. Ensure that the search hub value is included in all Search API and UA requests.

Note

If you’re using the Atomic library, you need to set the search hub value in your search interface using the searchHub attribute of the atomic-search-interface component.