Query Pipeline Deployment Overview

You can define query pipelines in your Coveo Cloud organization when you have more than one search interface with distinct users and purposes, and want to apply different rules or models for each (see What Is a Query Pipeline? and Managing Query Pipelines).

This topic describes the steps needed to create a query pipeline and configure a JavaScript Search interface to use this query pipeline.

Deploy a Query Pipeline

  1. Choose a query pipeline routing mechanism (see Query Pipeline Routing Mechanisms and Rules). Condition-based routing is recommended.

  2. In your Coveo Cloud organization, create a pipeline with specific rules for the desired search interface (see Managing Query Pipelines).

    You can duplicate an existing pipeline and make changes rather than starting from scratch.

  3. Depending on your chosen routing mechanism, implement your query pipeline as follows (see Query Pipeline Routing Mechanisms and Rules):

    If you chose to create a condition-based query pipeline, add a condition for the pipeline to be used when a query comes from your JavaScript Search search interface (see Managing Query Pipeline Conditions).

    Search Hub is [SearchInterfaceName]


    Chose to hard-code your query pipeline in your search interface (see Add a Query Pipeline to a Coveo Cloud V2 Search Interface).


    If you chose to add your pipeline in your search token code, edit your server-side code so that it specifies the desired pipeline name when requesting a search token (see Search Token Authentication).

  4. Validate that the search interface now uses the new pipeline.

    Test a thesaurus entry that only exists in the new pipeline.

Add a Query Pipeline to a Coveo Cloud V1 Search Interface

  • Coveo for Salesforce 1.0 - July 2015  Modify the JavaScript search interface using the Interface Editor:

    1. Access the JavaScript Search search page for which you created the new query pipeline.

    2. Open the JavaScript Search Interface Editor (see Accessing the Coveo Legacy Interface Editor in Salesforce or Accessing the JavaScript Search Interface Editor for a Search API Hosted Page).

    3. In the Interface Editor, depending on your version:

      • Coveo for Salesforce 2.26 - July 2016 


      • Coveo for Salesforce 2.12 - May 2016 

        1. Select the Advanced Mode check box (see JavaScript Search Legacy Interface Editor Overview).

        2. Click in the white area of the search interface to see the Search Interface component parameters.

        3. In the Search Interface Pipeline box, enter the name of new query pipeline that you created for this search interface.

        4. Save and publish your change.

          The Interface Editor adds the data-pipeline="myPipelineName" to the element with CoveoSearchInterface class:

           <div class="CoveoSearchInterface" data-pipeline="myPipelineName">
  • Modify the JavaScript search interface code using a text editor:

    1. Open the JavaScript search interface source code.

    2. In the JavaScript expression where you set the SearchEndpoint, add a queryStringArguments option where you include the pipeline argument with the name of your new pipeline as the value.

      If the name of the pipeline to use by the search interface is myNewPipeline, the code would be:

       Coveo.Rest.SearchEndpoint.endpoints["default"] = new Coveo.Rest.SearchEndpoint({
           restUri: 'https://cloudplatform.coveo.com/rest/search',
           queryStringArguments: {
             pipeline: 'myNewPipeline'
    3. Save and publish your change.