Search often seems like it “just works,” but there’s a lot going on behind that little box. When someone searches on a given search hub like your website or intranet, their queries go through a bit of technological magic to get the most relevant results. The name for this wizardry is called a “query pipeline” but what makes it work isn’t magic – it’s human ingenuity (sometimes mixed with a bit of machine learning).
Behind the search box lies a complex process of query retrieval and result ranking. When someone enters a search command, it triggers an automated process designed to find and identify the right content, down to a single document, blog post, product, or piece of information.
The query pipeline applies advanced rules and machine learning algorithms to understand context and intent, shaping the search journey based on individual user needs.
This post will explain what query pipelines are. Learning how to adjust these parameters will improve the search experience for your customers and employees. It’s an advanced — yet user-friendly — method of fine-tuning results across all your search hubs.
What is a Query Pipeline?
A query pipeline works as an intelligent funnel, tailoring search queries to retrieve results that are matched to the current user and the context of the query. There are two parts to a query pipeline, the rules and the conditions:
- Rules – Allow you to optimize the search experience by modifying a query or search result (for example, redirecting a user, adding preferred search terms).
- Conditions – A set of predefined requirements that a query must meet for a query pipeline or a query pipeline rule to execute. Multiple conditions can be set for a rule.
A query pipeline ensures that the query result your customer sees is tailored to what they are looking for, which it ascertains not just from the query input but a collection of other data.
![Query pipelines are found under the Search category in your admin console](https://cdn.coveo.com/images/w_1893,h_914,c_scale/v1717761925/blogprod/coveo-query-pipelines-in-admin-console_990291070ed9/coveo-query-pipelines-in-admin-console_990291070ed9.png?_i=AA)
The pipeline automatically applies things like correct spellings, synonym matching, and weighting of certain terms. It can also include things like user context and query context (e.g., who someone is and where they are in their buying or information journey) to serve up more relevant results.
Recognizing Which Query Parameters Impact The Pipeline
When someone does a search on one of your search hubs, their search query contains additional metadata beyond the search terms themselves. This extra data helps customize and direct the search. The query data includes parameters — which are extra descriptors that act like filters or rules.
Some examples of parameters that affect which pipeline is used to process the search query and deliver results are:
- q – Contains text a user enters inside the search field.
- searchHub – The name of the interface the query came from.
- tab – The search result tab name.
- language – The current interface language.
- pipeline – The query pipeline process used.
Understanding pipeline-related parameters allows you to better optimize and direct site search to match your business goals.
![Visual illustrates what the order of execution for query parameters](https://cdn.coveo.com/images/w_1590,h_810,c_scale/v1717761928/blogprod/order-of-execution-query-pipeline-features_990290849235/order-of-execution-query-pipeline-features_990290849235.png?_i=AA)
How Does a Query Pipeline Improve Search Performance?
You might think of search performance in terms of speed, response time, etc., but here, we mean the quality and quantity of results returned to a user’s query. Query pipelines are great for this.
Query pipelines use different components to shape what information is presented to a searcher and improve search performance. Configuring these components controls how the query pipeline works to display the most relevant search results using advanced machine learning techniques.
These descriptors act like filters or sorting rules to shape what information the search tool retrieves from the index, and the search results the user receives. The entire pipeline execution happens very quickly, often in milliseconds, to return fresh results on the latest topics and information.
Query Pipeline Example
Say you perform a search for “raw dog food.” The full URL with all the parameters attached might look like this:
https://www.petsuppliesplus.com/search?query=raw%20dog%20food#q=raw%20dog%20food&sort=relevancy&f:availablestores=[9034]In the above example, the full URL a user might see is:
- https://www.petsuppliesplus.com/search – This is the base URL
The query parameters portion in bold defines custom search filters like:
- query=raw%20dog%20food: This is the “query” parameter and “raw%20dog%20food” is the value that represents the search term.
- #q: This is the fragment identifier, used to navigate to a specific part of a webpage.
- sort=relevancy: Sort is the parameter name. Relevancy is the value which indicates that search results should be sorted by relevance.
- f:availablestores: F is the parameter name, likely indicating a filter based on available stores.
- [9034]: This is the value for F, which seems to be an identifier for a specific store or set of stores.
This illustrates that, behind the scenes, each query has additional descriptors and settings attached to it that help customize the search experience. These descriptors act like filters or sorting rules to shape what information the search tool retrieves, and the search results the user receives.
![Query pipelines and AI ensure the most relevant content is surfaced to your users.](https://cdn.coveo.com/images/w_1280,h_976,c_scale/v1707330158/blogprod/resultstoquery_7470048ab/resultstoquery_7470048ab.jpg?_i=AA)
How Many Query Pipelines Should Your Search Experience Use?
Our recommendation is to create one query pipeline for each search interface you have (this will also depend on your unique implementation). By “search interface,” we mean things like your e-commerce site, company intranet, or customer service portal. Basically, all the places people are searching for information on your platforms.
And in the context of multiple languages, you’d want a pipeline per language since you might want to create rules that are based on the query (for example, managing synonyms).
Setting up individual query pipelines lets you customize the search experience to what each specific audience is looking for. For example, customers searching your e-commerce site want to find and buy products. So, you’d optimize that pipeline to showcase inventory. On the company intranet, employees want internal info and documents. That requires different settings.
The key points to remember are:
- Search interfaces are for different audiences with different needs. What an external customer wants is different than what an employee wants.
- Unique pipelines mean you can tune the search for each interface separately. This includes things like featured results and relevancy ranking.
- One generic pipeline used everywhere rarely cuts it, because search needs to vary by interface and by user. Customization is key.
How to Add a Query Pipeline
Coveo users can adding a new query pipeline through our administration console by going through the following steps:
- Step 1: From the administration console, go to the Search section and select the Query Pipelines tab.
- Step 2: Click the Add Pipeline button in the top right corner to open the pipeline creation interface.
- Step 3: Assign a descriptive name for the pipeline. Add a user note with a detailed description of the purpose for other users, then select a condition from the dropdown menu to control which search interface it applies to.
- Step 4: Set access control in the Access tab by choosing a team or group should be able to manage this pipeline using the administrator role. Then select Save pipeline.
Learn more about adding a query pipeline on our docs site.
Query Pipeline Best Practices
There are some best practices you can follow to make sure the query pipelines you create are configured properly. They include:
- Providing detailed user notes listing the purpose and audience for each pipeline, so other admins understand what the pipeline is for.
- Monitoring search metrics on each pipeline often to see how the search experience could be optimized.
- Making sure every search hub and interface you have is connected to a relevant query pipeline that’s configured for that specific hub.
- Optimizing query performance by keeping pipeline configuration simple. Too many complex features or ranking expressions slow down search results. This also means reviewing rules in the pipeline in order to validate if they are still relevant, especially ranking rules.
- Limiting administrative access to only a few members. Consider creating roles focused specifically on tuning and maintaining pipelines instead.
- Test your pipeline regularly to ensure it’s functioning as intended. Learn more about testing pipelines on our docs site.
Shaping Search Experiences with Query Pipelines
Query pipelines shape how search results are delivered by applying parameters and rules to search commands initiated by users. They act as specialized instances of query engines designed to handle a particular search interface or audience.
Fine-tuning pipelines improves result sets by customizing which documents are shown for specific use cases. Optimizing them involves understanding their components and configuring conditions that best fulfill an organization’s search needs. Ultimately, query pipelines enable you to provide tailored, context-aware experiences that match individual employee and customer search needs.
Dig Deeper
Query pipelines are just one of many important pieces to evaluate when selecting an AI search platform. Find out the others and what to consider in our free white paper, Buyers Guide to Enterprise Search.