Configure query pipelines and machine learning for your hosted search page

After you create your search page, we highly recommend that you configure query pipelines and Coveo Machine Learning (Coveo ML) for your search page for enhanced relevance.

A query pipeline can be associated with one or more Coveo ML models. A pipeline can also contain custom relevance tuning rules (thesaurus, featured results, stop words, etc.), which allows you to modify incoming search requests as required.

Hosted search pages created with the builder support the following Coveo ML models, among others:

Note

Each of the Coveo ML models listed here are optional, but we highly recommend configuring all of them for an optimal search experience.

You’ll likely want to configure a main query pipeline that’s used to process manual search requests from your search page. Your ART, QS, and Smart Snippet models will be associated to this query pipeline.

Step 1: Create the main query pipeline

  1. On the Query Pipelines (platform-ca | platform-eu | platform-au) page, click Add pipeline.

  2. In the Add a Query Pipeline panel that opens, select the Configuration tab.

  3. Enter a Pipeline name (for example, Commerce_Search_Main_Pipeline).

  4. (Optional) Enter a Description for the query pipeline to help Administration Console users understand its purpose.

  5. (Optional) Select a Use case to categorize your query pipeline.

  6. Under Condition, create one of the following query pipeline conditions, where you replace <SEARCH_HUB> with the search hub value of your search page.

    Create a Search Hub is <SEARCH_HUB> condition.

    Examples

    If your search hub value is Commerce_Search, the condition for your main query pipeline should be Search Hub is Commerce_Search.

  7. Click Add Pipeline.

Note

Assuming each pipeline in your organization (except the default one) has a unique condition based on a distinct search hub value, all manual search requests originating from your search page will now be routed to your new pipeline.

Step 2: Configure machine learning models

Configuring Coveo ML Automatic Relevance Tuning (ART) and Query Suggestions (QS) can significantly improve relevance for end users performing manual queries in your search page. Smart Snippets provide users with answers to their manual queries directly on the results page by displaying a snippet of the most relevant result item.

Note

Smart Snippets aren’t supported in classic JavaScript Search Framework search pages. Classic search pages appear with a Classic badge on the Search Pages (platform-ca | platform-eu | platform-au) page.

Classic badge

Step 2a: Create ART, QS, and Smart Snippet models

Step 2b: Associate the ART, QS, and Smart Snippet models

Associate the ART, QS, and Smart Snippet models with the main query pipeline that you created for your search page.

  1. Associate the ART model with your main query pipeline.

  2. Associate the QS model with your main query pipeline.

  3. Associate the Smart Snippet model with your main query pipeline.

Note

Assuming the ART and QS models are created successfully, and the main query pipeline is properly configured, the ART and QS features should now be enabled in your search page. For Smart Snippets, you must enable the feature in your search page.

Step 2c: Enable Smart Snippets in your search page

Once you’ve created your Smart Snippet model and associated it with your main query pipeline, you must enable the feature in your search page configuration.

Note

Smart Snippets aren’t supported in classic search pages. Classic search pages configurations appear with a Classic badge on the Search Pages (platform-ca | platform-eu | platform-au) page.

Classic badge

Step 3: Define custom relevance tuning rules (advanced)

If needed, you can define custom relevance tuning rules in the main query pipeline that you created for your search page.

Use the following table as a reference:

Rule type Use case

Thesaurus

Defines synonyms to expand in user queries.

Featured results

Provides a high-ranking score boost to certain items.

Stop words

Defines terms to ignore in the basic query expression (q).

Ranking expressions

Increases or decreases the ranking scores of certain items by a certain amount.

Ranking weights

Fine-tunes the default weights of the standard index ranking factors.

Triggers

Defines actions to execute in the search panel under certain circumstances.

Filters

Appends expressions to the basic (q), advanced (aq), constant (cq), disjunction (dq), or large (lq) query expression.

Query parameters

Sets or overrides the values of certain search request parameters.

Tip
Leading practices

What’s next?