Manage Ranking Weight Rules

The instructions in this article apply to organizations that haven’t gone through the query pipeline migration process. If your organization has been migrated, you must manage ranking weight rules using the Advanced tab of a query pipeline configuration.

A Coveo Platform index uses a number of ranking factors to evaluate the relevance score of each search result for each query. When the search interface sorting is set to Relevance, the search results are presented in descending relevance score order to present the most pertinent items at the top.

The pre-tuned ranking weights used by Coveo Platform indexes for each of the ranking factor have been optimized over years of experience with a wide variety of indexed content to deliver well balanced out-of-the-box relevance scores in most cases.

You can fine-tune one or more of the pre-tuned ranking factors for a specific query pipeline. When you see that the ranking of specific search results isn’t ideal in a specific search context or case, consider adjusting one or more of the available ranking factors.

Be careful however when making adjustments as by default, all queries going through the pipeline will be affected. Fixing the ranking for a specific context may have undesired effect on other contexts.

Add a condition to each ranking weight rules so they apply only for the more specific context in which you want to improve relevance.

The following table provides description for the ranking factor that you can tune.

Ranking factor Description

Item last modification

The relevance score is increased for items with a more recent modification date.

Keyword frequency

The relevance score is increased for items containing a higher number of occurrences of keywords. The boost increases proportionally to the number of times a keyword appears in an item relative to the number of times it appears in the index.

Keyword in concept

The Coveo Platform uses a linguistic algorithm to create a list of the most important concepts found in an item (see the @sysconcept field). The relevance score is increased for items containing keywords in their concepts.

Keyword in title

The relevance score is increased for items containing keywords in their title. The boost increases as the proportion of title terms matching the query increases.

An item with a title exactly containing the keywords will have a higher relevance score boost than an item with a title containing only one of the keywords.

Keyword in summary

When indexing an item, the Coveo Platform uses a linguistic algorithm that scans and extracts all readable sentences of an item. At query time, the algorithm relies on term frequency and proximity to select the sentences that best represent the query and creates an item summary made from those sentences. The more the summary contains queried keywords, the higher the score.

Keyword proximity

When a query includes more than one keyword, by default the relevance score is increased for items in which keywords appear close to each other. The boost increase is inversely proportional to the distance between the keywords in the item.

An item containing keywords appearing side-by-side will have a higher relevance score boost than one containing the keywords dispersed in a paragraph.

The following diagram highlights the position of ranking weight rules in the overall order of execution of query pipeline features.

Apply ranking weight rules

Access the “Ranking Weights” Tab of a Pipeline

  1. On the Query Pipelines page, click the query pipeline in which you want to manage ranking weight rules, and then in the Action bar, click Edit components.

  2. On the selected pipeline page, select the Ranking Weights tab.

Manage Query Pipeline Ranking Weights

Members with the privilege to view query pipelines (i.e., the View all or the Custom access level on the Query Pipelines domain) can review ranking weight rules in read-only mode (see Manage Privileges and Query Pipelines Domain).

For all the other actions you can perform on your ranking weight rules, see Manage Query Pipeline Rules and Rule Conditions From Tabs.

Add a Ranking Weights Rule

  1. Access the “Ranking Weights” tab of a pipeline.

  2. In the upper-right corner, click Add Rule.

  3. On the Add Rule subpage that opens, under Ranking Factors, click and drag the sliders to the desired value.

    • 5: default pre-tuned recommended ranking factor value.

    • 6 to 9: progressively boost the weight of a ranking factor relative to its pre-tuned value.

    • 4 to 0: progressively reduce the weight of a ranking factor relative to its pre-tuned value.

  4. On the right-hand side, under Condition, you can optionally select a query pipeline condition in the drop-down menu or create a new one.

  5. In the User note box, optionally enter a description to help Administration Console users understand the purpose of your ranking weight rule.

  6. Click Add Rule or Save. Your changes are now effective on the pipeline.

  7. Validate the effect of your ranking weight rule in the Coveo JavaScript Search Framework Debug Panel (see rankingInfo Section).

    • The relative weight of each of the available ranking factor isn’t equal. Some have significantly more effect than others on the total ranking score. Consequently, it may be difficult to predict and validate the effect of the changes you made to ranking weight factors.

    • Advanced users can also directly enter a rule that respects the Query Pipeline Language (QPL) syntax for ranking weights (see Ranking Weights):

      1. In the Ranking Weights tab, click Action-Menu, and then select Add a ranking weight with code.

      2. In the Add a Rule With Code dialog, in the form editor box, enter a ranking weights rule.

      3. Click Add Rule.

Required Privileges

By default, members of the Administrators and Relevance Managers built-in groups can view and edit elements of the Query Pipelines page.

The following table indicates the required privileges to view or edit elements of the Query Pipelines page, and associated panels and subpages (see Manage Privileges and Privilege Reference).

Action Service - Domain Required access level
View ranking weights

Search - Query pipelines

Edit ranking weights

Search - Query pipelines

Recommended Articles