Recommended Query Pipeline Configurations

This article provides guidelines on how to tune your query pipeline components to further improve the relevance of your solution in the context of Coveo for Commerce.

The following guidelines don’t replace the Coveo ML models, but merely supplement them.

In the Coveo Administration Console, in the Query Pipelines tab, select the target pipeline and navigate to the pages indicated below.

Ranking Weights

To avoid granting excessive importance to item keywords that are too common or irrelevant, tune query pipeline ranking weight rules roughly as follows:

  • Set Item last modification, Keyword frequency, and Keyword in concepts, to 0.

  • If item titles aren’t distinctive and well formatted, lower Keyword in title to 4.

  • Set Keyword in summary to 9.

  • Lower Keyword proximity to 3.

commerce ranking weights

Ranking Expressions

Use ranking expressions to leverage useful keywords which may have been left behind by the above ranking weights tuning. More precisely, you will want to boost products whose category or brand field value matches a query keyword. If other fields contain relevant keywords which may be used in queries, boost them as well.

To do so, use the $splitValues query extensions to extract query keywords. You can then use $removeMatchingValues to remove irrelevant keywords, such as AND/OR/(/), which appear in thesaurus expansions. Compare the resulting keywords with target fields. If successful, apply a ranking modifier of +30, as in the example below:


Your items contain a category field and a brand_name field, which, as their names indicate, hold the product category and brand name. You create ranking expressions to apply a +30 ranking modifier on items whose values for those fields match query keywords.

You also have a color field which you decide to leverage in the same manner.

commerce ranking expressions


Assuming you respect the leading practices, you can create query pipeline thesaurus rules for synonyms.


Your index contains several items pertaining to the unfortunately named ACME CTRLR game controller (user manual, troubleshooting articles, etc.).

Usage analytics reports indicate that a sizable portion of end users who are obviously looking for information on this product in your Coveo-powered community portal are actually searching for acme pad, and not getting any relevant results.

To address the issue, you create a thesaurus rule that includes acme ctrlr when acme pad is part of the user’s query.

capture of the Administration Console showing a Thesaurus rule

Stop Words

You can leverage stop words to remove certain irrelevant keywords from queries, such as to, in, of, etc. You should, however, do so carefully, and make sure to test the relevance of your solution with your stop words.

commerce stop words

Query Parameters

Add query pipeline query parameters to ensure the query syntax is disabled and to enable partial match. The query syntax should already be disabled by default, since most end-users don’t know how to leverage it. As for the partial match feature, it allows your Commerce solution to return result list items which don’t contain all queried keywords.

commerce query parameters
Recommended Articles