Using a Query Pipeline

This page covers how to set a query pipeline in a Coveo for Sitecore Cloud installation.

For additional information on query pipelines, see Managing Query Pipelines.

When no pipeline is specifically set, the pipeline identified with the default tag under Info is used.

Set the Query Pipeline to Use for All Indexes

In your Coveo.SearchProvider.config file, locate the defaultIndexConfiguration/queryConfiguration section. Copy it, and paste it in your Coveo.SearchProvider.Custom.config file, under defaultIndexConfiguration.

Set the value of the queryPipelineName element with your query pipeline name.

<defaultIndexConfiguration type="Coveo.AbstractLayer.CoveoDefaultIndexConfiguration, Coveo.AbstractLayer">
  ...
  <!-- Coveo Query configuration -->
  <queryConfiguration type="Coveo.Framework.Configuration.QueryConfiguration, Coveo.Framework">
    ...
    <!-- The queryPipelineName element defines the query pipeline name to use in queries. Leave this field empty to use the default query pipeline. -->
    <queryPipelineName>myQueryPipelineName</queryPipelineName>
  </queryConfiguration>
  ...
</defaultIndexConfiguration>

Set the Query Pipeline to Use for a Specific Index

In your Coveo.SearchProvider.config file, locate the contentSearch section. Copy it, and add it to your Coveo.SearchProvider.Custom.config file.

Under configuration/indexes, if not already done, change the configuration element of the specific index to override the queryConfiguration section and set the queryPipelineName.

<index id="Coveo_master_index" type="Coveo.SearchProvider.ProviderIndex, Coveo.SearchProvider" patch:before = "*[1]">
  <param desc="p_Name">$(id)</param>
  <configuration ref="coveo/defaultIndexConfiguration">
    <queryConfiguration ref="coveo/defaultIndexConfiguration/queryConfiguration">
      <!-- The queryPipelineName element defines the query pipeline name to use in queries. Leave this field empty to use the default query pipeline. -->
      <queryPipelineName>myQueryPipelineName</queryPipelineName>
    </queryConfiguration>
  </configuration>
</index>

Set the Query Pipeline to Use in Your Coveo Search Page

The query pipeline can also be set directly in the Coveo Search component.

Using the Content Editor or Page Editor, edit the properties of the Coveo Search component present in your Coveo Search Page.

In the Advanced section, set the Query pipeline name.