Filter and boost using query pipelines

Warning
Legacy feature

This article pertains to achieving relevance with the Coveo Hive framework. Coveo Hive is now in maintenance mode.

See Achieve relevance for guidance on leveraging Coveo Platform relevance features with the Coveo Atomic library.

This article provides instructions on how to create filtering and boosting rules in query pipelines.

You might well decide to create several query pipelines, based on your specific requirements. You can then decide upon the best query pipeline mapping strategy. For example, you might want to associate a search interface to a specific query pipeline (as explained in this article) or use a more dynamic, condition-based pipeline routing approach (see Route search queries to query pipelines).

Query pipeline filtering

  1. Create a query pipeline in the Coveo Administration Console. For now, don’t create a condition. Stop after step 4.

  2. In your query pipeline, add a filter rule.

    Example

    To ensure only Sitecore items associated with a layout appear in the results list, the query expression would look like the following.

    QueryPipelineFilter
    Important

    Use the Coveo field name (also called the Translated Name), not the Sitecore field name, when creating query expressions (see About the Indexing Manager - Fields).

  3. In the Experience Editor, on the Coveo Search Interface rendering floating toolbar, select the Edit the rendering’s data source option.

  4. In the Query Settings section, enter the name of your pipeline in the Query pipeline field.

Query pipeline boosting

There are several result boosting methods available in query pipelines. Boosting results based on a ranking expression is one of them (see Manage ranking expression rules).

Example

You have a Sitecore website about world lakes. Your lake items contain a Depth field. When your visitors land on a page that describes a deep lake, you might like to promote other lake items with comparable depths.

QueryPipelineRankingExpression
Important

Use the Coveo field name (also called the Translated Name), not the Sitecore field name, when creating query expressions (see About the Indexing Manager - Fields).