--- title: Manage query pipelines slug: '1791' canonical_url: https://docs.coveo.com/en/1791/ collection: tune-relevance source_format: adoc --- # Manage query pipelines [query pipelines](https://docs.coveo.com/en/180/) are useful for optimizing search relevance and tailoring the search experience for different [search interfaces](https://docs.coveo.com/en/2741/), user groups, or use cases. You can use the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page in the [Coveo Administration Console](https://docs.coveo.com/en/183/) to create a new pipeline or [manage components](#manage-query-pipeline-rules-and-models) such as [rules](https://docs.coveo.com/en/236/) and [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) [models](https://docs.coveo.com/en/1012/) in an existing one. ![Query pipeline listing page | Coveo](https://docs.coveo.com/en/assets/images/tune-relevance/pipeline-listing-page.png) 1 Every organization has a default query pipeline that's automatically created when an organization is first created. You can add additional query pipelines if you have multiple [search interfaces](https://docs.coveo.com/en/2741/) with distinct users and purposes, and you want to apply different rules or models to each interface. 2 [Conditions](https://docs.coveo.com/en/1959/) determine when a particular pipeline, rule, or Coveo ML model is applied to a query. 3 The **Info** column shows if a pipeline is the default pipeline, and/or if it has an [A/B test](https://docs.coveo.com/en/3255/) that's either active, paused, or stopped. A/B tests let you compare the performance of two query pipelines. 4 The **Recent queries** column gives you a first glance of how the query pipeline is performing. It displays the number of queries from the past 30 days as well as the trend data. 5 The **Last queried** column shows the last time the pipeline was queried. However, this data is refreshed every 2 hours, meaning the column will display **2 hours ago** even if a more recent query was made in that time. If the pipeline was never queried or if it's been more than 30 days since the last query, the column displays **N/A**. 6 When managing a query pipeline, you can add information about the pipeline to make it easily identifiable and to facilitate maintenance. 7 You can [create a query pipeline](#create-a-query-pipeline) from the listing page. ## Create a query pipeline . On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click **Add Pipeline**. . In the **Add a Query Pipeline** panel that opens, enter a **Pipeline name**. > **Note** > > This name appears as the title of your pipeline page and can be used to enforce the pipeline in the [search token](https://docs.coveo.com/en/1346/) or in the [search interface](https://docs.coveo.com/en/2741/) (see [Query pipeline routing mechanisms and rules](https://docs.coveo.com/en/1666/)). . Enter a **Description** for the query pipeline to help [Administration Console](https://docs.coveo.com/en/183/) members understand its purpose. . Select a **Use case** to [categorize your query pipeline](https://docs.coveo.com/en/l1be0007#use-case) . (Optional) Use the **Project** selector to associate your query pipeline with one or more [projects](https://docs.coveo.com/en/n7ef0517/). > **Note** > > After the query pipeline creation, you can update your Coveo project selection under the **Configuration** tab. . Under **Condition**, select or [create](https://docs.coveo.com/en/1959#create-a-condition) an appropriate [query pipeline condition](https://docs.coveo.com/en/2793/) to apply. . In the **Interface URL** section, you can optionally [define the URLs](https://docs.coveo.com/en/l1be0007#interface-url-section) of the search interfaces that use this query pipeline. [start=8] . On the **Access** tab, specify whether each group (and API key, if applicable) in your [Coveo organization](https://docs.coveo.com/en/185/) can view or edit the current pipeline. For example, when creating a new pipeline, you could decide that members of Group A can edit its configuration, while Group B can only view it. For more information, see [Custom access level](https://docs.coveo.com/en/3151#custom-access-level). > **Note** > > To modify access to a query pipeline, you need additional privileges. > See the required privileges for managing [member access](https://docs.coveo.com/en/1980#required-privileges) and [API keys](https://docs.coveo.com/en/1718#required-privileges). . Click **Add Pipeline**. ## Test a query pipeline in the Content Browser Click the query pipeline that you want to test, and then click **More** > **Open in Content Browser** in the Action bar. On the [**Content Browser**](https://platform.cloud.coveo.com/admin/#/orgid/content/browser/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/browser/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/browser/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/browser/)) page, you can perform queries to validate the behavior of this specific pipeline. ## Set a query pipeline as the default Click the query pipeline that you want to set as the default, and then click **More** > **Set as default** in the Action bar. The ![Default](tune-relevance/query-pipeline-default-tag.png) tag appears in the **Info** column for this pipeline. The default query pipeline is used when no pipeline condition matches the query (see [Query pipeline routing mechanisms and rules](https://docs.coveo.com/en/1666/)). > **Note** > > Only one pipeline can be configured as the default pipeline. > You can't delete the default pipeline without first setting another pipeline as the default. > **Important** > > Since the default query pipeline is used when no other pipeline matches the query, it's important to make sure that no condition is set on the default pipeline. > This way, the default pipeline applies to all queries when needed. ## Edit the condition on a query pipeline . On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the desired query pipeline, and then click **Edit components** in the Action bar. . On the page that opens, select the **Configuration** tab. . Under **Condition**, click [x] next to the condition to remove the current condition. . Optionally, select or [create](https://docs.coveo.com/en/1959#create-a-condition) a condition to replace the one you removed. . Click **Save**. ## Rename a query pipeline . On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the desired query pipeline, and then click **Edit components** in the Action bar. . On the page that opens, select the **Configuration** tab. . Under **Pipeline name**, you can change the query pipeline name. . Click **Save**. > **Note** > > To rename a query pipeline used in production, [create an A/B test](https://docs.coveo.com/en/3255/). > That's because you must update all references to the old query pipeline name, lest you break your search solution. > For example, if you [set the pipeline name in search tokens](https://docs.coveo.com/en/56#pipeline-string-optional), you'll need to update it and test that everything works as desired. ## Duplicate a query pipeline . On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the query pipeline that you want to copy, and then click **Duplicate** in the Action bar. On the **Query Pipelines** page, a copy of the pipeline is instantly created and appears at the bottom of the page. . Edit the duplicated pipeline to give it a [more meaningful name](#rename-a-query-pipeline). > **Notes** > > * The conditions on the original pipeline aren't included in the duplicated pipeline. > > * You can use the duplicate of a pipeline as a starting point for your [A/B tests](https://docs.coveo.com/en/3255/). ## Modify access to a query pipeline . On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the query pipeline that you want to modify, and then click **More** > **Edit access** in the Action bar. . On the page that opens, click [dots] in the upper-right corner, and then click **Manage access**. . In the **Manage access** panel that appears, you can modify access levels for groups and API keys. > **Note** > > To modify access to the query pipeline, you need additional privileges. > See the required privileges for managing [member access](https://docs.coveo.com/en/1980#required-privileges) and [API keys](https://docs.coveo.com/en/1718#required-privileges). ## Delete a query pipeline . On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the query pipeline that you want to remove, and then click **Delete** in the Action bar. . In the confirmation prompt that appears, click **Delete**. > **Notes** > > * You can't delete the default query pipeline. > > * If you inadvertently delete a query pipeline, contact [Coveo Support](https://connect.coveo.com/s/case/Case/Default) to retrieve the query pipeline rules. ## Manage query pipeline rules and models . On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the desired query pipeline, and then click **Edit components** in the Action bar. . [[components]] On any pipeline page, you can add and manage the query pipeline rules and models. * Click the [[search-terms]][**Search terms**](https://docs.coveo.com/en/3440/) tab to manage [thesaurus](https://docs.coveo.com/en/3405/) or [stop word](https://docs.coveo.com/en/3406/) rules. * Click the [[result-ranking]][**Result ranking**](https://docs.coveo.com/en/3234/) tab to manage [featured results](https://docs.coveo.com/en/3376/) or [ranking expression](https://docs.coveo.com/en/3375/) rules. * Click the **Machine learning** tab to manage [associations with Coveo Machine Learning models](https://docs.coveo.com/en/2816/). * Click the [[advanced]][Advanced](https://docs.coveo.com/en/3409/) tab to manage the following advanced rules: ** [Filters](https://docs.coveo.com/en/3410/) ** [Query parameters](https://docs.coveo.com/en/3411/) ** [Ranking weight rules](https://docs.coveo.com/en/3412/) ** [Triggers](https://docs.coveo.com/en/3413/) > **Note** > > You can also [add a rule with code](https://docs.coveo.com/en/1854/) for [thesaurus](https://docs.coveo.com/en/3405/), [filter](https://docs.coveo.com/en/3410/), [ranking weight](https://docs.coveo.com/en/3412/), and [trigger](https://docs.coveo.com/en/3413/) rules. ### Export and import query pipeline rules and models Once you've created rules and models, you may want to reuse them in other query pipelines. Exporting and importing query pipeline elements helps you streamline the migration of rules and models from one pipeline to another. For more information, see [Export and import query pipeline elements](https://docs.coveo.com/en/2023/). ## View query pipeline activity . On the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page, click the desired query pipeline, and then click **Activity** in the Action bar. . On the **Activity** page that opens, you can view the activity logs for this query pipeline. * To view the query pipeline directly in the [**Activity Browser**](https://docs.coveo.com/en/1969/), click **View in Activity Browser** in the lower-right corner. The **Activity Browser** opens with the query pipeline filter already applied. ## Understand query pipeline routing [queries](https://docs.coveo.com/en/231/) are routed to one [query pipeline](https://docs.coveo.com/en/180/) based on the routing mechanism you choose. While there are multiple routing mechanisms available, condition-based routing is recommended. When using condition-based routing, consider the following: * Don't enforce a query pipeline in the search interface or in the search token. If a query pipeline is enforced by the search interface or by the search token, the condition-based pipeline is ignored. * Enforce a `searchHub` value in the search token and base query pipeline conditions on that value. **Example** Search Hub is `External Search`. * Ensure query pipeline conditions are mutually exclusive. * Validate the query pipeline after creating it: **Example** You create a query pipeline with a stop word rule. To test its efficiency, you use the **Content Browser** by performing a query that would be affected by the stop word rule. ## Required privileges The following table indicates the privileges required to view or edit elements of the [**Query Pipelines**](https://platform.cloud.coveo.com/admin/#/orgid/search/pipelines/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/search/pipelines/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/search/pipelines/)) page. Learn more about the [Privilege reference](https://docs.coveo.com/en/1707/) and how to [manage privileges](https://docs.coveo.com/en/3151/). [cols="3",options="header"] |=== |Action |Service - Domain |Required access level |View query pipelines |Organization - Organization Search - Query pipelines Machine Learning - Models |View .2+|Add, edit, and delete query pipelines |Organization - Organization Machine Learning - Models |View |Search - Query pipelines |Edit |View test search page |Search - Query pipeline preview |View |=== > **Notes** > > * The ability to create query pipelines can be granted independently from the **Edit all** access level (see [Can create ability dependence](https://docs.coveo.com/en/3151#can-create-ability-dependence)). > You can therefore grant a group or an API key the **View all** or [**Custom**](https://docs.coveo.com/en/3151#custom-access-level) access level for query pipelines and check the **Can create** checkbox to allow users to create query pipelines. > > * The privileges required to view or edit query pipeline [rules](https://docs.coveo.com/en/236/) differ depending on the type of rule you want to manage: > > ** [A/B tests](https://docs.coveo.com/en/3255#required-privileges) > > ** [Groups & campaigns](https://docs.coveo.com/en/3283#required-privileges) > > ** [Thesaurus rules](https://docs.coveo.com/en/3405#required-privileges) > > ** [Stop words](https://docs.coveo.com/en/3406#required-privileges) > > ** [Featured results](https://docs.coveo.com/en/3376#required-privileges) > > ** [Ranking expressions](https://docs.coveo.com/en/3375#required-privileges) > > ** [Associations with Coveo Machine Learning models](https://docs.coveo.com/en/2816#required-privileges) > > ** [Filters](https://docs.coveo.com/en/3410#required-privileges) > > ** [Query parameters](https://docs.coveo.com/en/3411#required-privileges) > > ** [Ranking weight rules](https://docs.coveo.com/en/3412#required-privileges) > > ** [Triggers](https://docs.coveo.com/en/3413#required-privileges)