- Build Query Pipelines
- Clean Search Queries
- Control Search Result Ranking
- Customize Your Search Experience
- Route Your Audiences to the Right Content
- Debug Query Pipelines
About the Query Pipeline Routing Algorithm
The following diagram illustrates the process of a query being routed to a query pipeline.
1: The Last pipeline in organization refers to the pipeline whose
position attribute is the highest of all the query pipelines in the Coveo organization.
- If the query enforces a pipeline, go to Step 3 using the query-enforced pipeline bypassing its condition, if any (see Query Pipeline Routing Mechanisms and Rules).
- Otherwise, for each pipeline that has a condition in the Coveo organization:
- Route the query through the pipeline.
Unless a specific query pipeline is enforced (see Step 1), pipelines with conditions are evaluated sequentially until a condition is satisfied (see Step 2). The order of evaluation of pipelines is based on the
positionattribute, which is automatically populated when a pipeline is created, and can’t be changed thereafter. In essence, this means that pipelines with conditions are typically evaluated from oldest to newest. This is slightly counter-intuitive, as pipelines are displayed in alphabetical order in the Coveo Administration Console. You can use the List query pipelines Search API operation to retrieve the actual
positionvalue of each pipeline in a Coveo organization.
It’s possible for the default query pipeline to have a condition. When this is the case, the default pipeline may be evaluated just like any other pipeline with a condition (see Step 2). However, if the query doesn’t satisfy the condition of any of the evaluated pipelines, it will ultimately be routed through the default pipeline, bypassing its condition.