Inspect your query pipeline and rules

A query pipeline is a set of rules that modifies user queries before they reach the index.

You can manage query pipelines on the Query Pipelines (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console.

If you have multiple search interfaces to serve distinct users and purposes, your Coveo organization may contain several query pipelines.

Tip
Leading practice

We recommend having a separate query pipeline for every search interface.

This article provides testing guidelines for the most common query pipeline components in a Coveo-powered implementation.

Important

This guide provides guidelines to analyze, review, and test different aspects of a Coveo-powered implementation.

It shouldn’t be considered an official, definitive guide to testing an implementation before it goes live, but rather a guide showcasing the basic components that Coveo implementations typically include.

Every Coveo implementation is different and may require custom configuration.

Therefore, you may notice discrepancies between the components and features listed in this guide and those you’re using in your actual implementation.

If you encounter issues, or have any questions related to this article, contact Coveo Support for help.

Access your browser’s network monitoring tool

  1. Open your web browser’s developer tools.

    Note

    The examples in this article use the Google Chrome developer tools. For browser-specific information, see:

  2. Select the Network tab.

Query routing

You should ensure that queries are directed to the right query pipeline for every search interface.

  1. Access the search interface in which you want to test query routing.

  2. Access your browser’s network monitoring tool.

  3. In the search box, perform a query.

  4. Enable debugging mode by appending &debug=true to the current URL.

    Enable debugging mode | Coveo
  5. In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain /rest/search/v2.

  6. Select the Preview tab.

  7. Find the pipeline property. Its value should correspond to the name of the query pipeline to which queries originating from this search interface must be routed.

    Query routing in developer tools | Coveo
  8. Access the Relevance Inspector:

    1. If your search interface leverages the Atomic library, select and hold Alt (Windows) or Option (Mac) and double-click any search interface element.

    2. In the modal that appears, select Open, and you’ll be redirected to the Coveo Administration Console. You may have to wait for your query to load.

    Note

    You can go directly to the Relevance Inspector (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console. If you do, you’ll need to rerun the query in the Relevance Inspector using the query’s SearchUid. You can find this value in the Preview tab of your network monitoring tool:

    Find the Search UID
  9. In the Relevance Inspector, the pipeline is displayed under Query pipeline selection (the second step in the Query journey). Click See details for more information about the pipeline through which the query was routed.

    Query routing in Relevance Inspector | Coveo

Thesaurus

Query pipeline thesaurus rules let you define lists of synonyms to help users find relevant results when they search for specific terms.

If a query pipeline contains thesaurus rules, we recommend that you review its configuration and test several entries in a search interface to ensure that the rules work as expected.

Review thesaurus rules configuration

  1. On the Query Pipelines (platform-ca | platform-eu | platform-au) page of the Administration Console, select the query pipeline for which you want to review thesaurus rules configuration. Then, in the Action bar, click Edit components.

  2. Select the Search Terms tab, and then click Thesaurus.

  3. Validate the thesaurus rules' configuration and associated conditions.

Test thesaurus rules in a search interface

  1. Access the search interface in which you want to test a thesaurus rule.

  2. Access your browser’s network monitoring tool.

  3. In the search box, perform a query that would trigger a thesaurus rule.

  4. Enable debugging mode by appending &debug=true to the current URL.

    Enable debugging mode | Coveo
  5. In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain /rest/search/v2.

  6. Select the Preview tab.

  7. Find and expand the executionReport property, and then expand the children sub-property.

  8. Expand the PreprocessQueryExpression property, and then expand the children sub-property.

  9. Check for a ApplyThesaurusFeature value. If you see a value for the applied sub-property, this means that a thesaurus rule was applied and modified the query.

  10. Expand the applied sub-property to see the definition of the rule that was applied.

    Thesaurus rule in developer tools | Coveo
  11. By expanding the result property, you can also see both the query that was initially sent (in) and the query modified by the thesaurus rule (out).

    Thesaurus result in developer tools | Coveo
  12. Access the Relevance Inspector:

    1. If your search interface leverages the Atomic library, select and hold Alt (Windows) or Option (Mac) and double-click any search interface element.

    2. In the modal that appears, select Open, and you’ll be redirected to the Coveo Administration Console. You may have to wait for your query to load.

    Note

    You can go directly to the Relevance Inspector (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console. If you do, you’ll need to rerun the query in the Relevance Inspector using the query’s SearchUid. You can find this value in the Preview tab of your network monitoring tool:

    Find the Search UID
  13. In the Relevance Inspector, the thesaurus rules are displayed under Query pipeline rules (the third step in the Query journey). Click See details for more information about the rule that was applied.

    Thesaurus rule in Relevance Inspector | Coveo

Stop words

Query pipeline stop word rules let you remove terms from a query before it’s sent to the index.

If a query pipeline contains stop word rules, we recommend that you review its configuration and test several entries in a search interface to ensure that the rules work as expected.

Review stop word rules configuration

  1. On the Query Pipelines (platform-ca | platform-eu | platform-au) page of the Administration Console, select the query pipeline for which you want to review stop word rules configuration. Then, in the Action bar, click Edit components.

  2. Select the Search Terms tab, and then click Stop words.

  3. Validate the stop word rules' configuration and associated conditions.

Test stop word rules in a search interface

  1. Access the search interface in which you want to test a stop word rule.

  2. Access your browser’s network monitoring tool.

  3. In the search box, perform a query that would trigger a stop word rule.

  4. Enable debugging mode by appending &debug=true to the current URL.

    Enable debugging mode | Coveo
  5. In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain /rest/search/v2.

  6. Select the Preview tab, and then find the basicExpression property.

  7. The value of the basicExpression property should reflect the stop word rule (in other words, the stop word terms shouldn’t be present in the query).

    In the following capture, the term mass was removed by a stop word rule:

    Stop word rule in developer tools | Coveo
  8. Access the Relevance Inspector:

    1. If your search interface leverages the Atomic library, select and hold Alt (Windows) or Option (Mac) and double-click any search interface element.

    2. In the modal that appears, select Open, and you’ll be redirected to the Coveo Administration Console. You may have to wait for your query to load.

    Note

    You can go directly to the Relevance Inspector (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console. If you do, you’ll need to rerun the query in the Relevance Inspector using the query’s SearchUid. You can find this value in the Preview tab of your network monitoring tool:

    Find the Search UID
  9. In the Relevance Inspector, the stop word rules are displayed under Query pipeline rules (the third step in the Query journey). Click See details for more information about the rule that was applied.

    Stop word rule in Relevance Inspector | Coveo

Ranking expressions

Query pipeline ranking expression rules let you modify the score of specific search results when certain conditions are met.

If a query pipeline contains ranking expression rules, we recommend that you review its configuration and test several entries in a search interface to ensure that the rules work as expected.

Review ranking expression rules configuration

  1. On the Query Pipelines (platform-ca | platform-eu | platform-au) page of the Administration Console, select the query pipeline for which you want to review ranking expression rules configuration. Then, in the Action bar, click Edit components.

  2. Select the Result Ranking tab, and then click a ranking expression rule.

  3. In the Action bar, click Edit.

  4. Validate the ranking expression rule’s configuration and associated condition.

Test ranking expression rules in a search interface

  1. Access the search interface in which you want to test a ranking expression rule.

  2. Access your browser’s network monitoring tool.

  3. In the search box, perform a query that would trigger a ranking expression rule.

  4. Enable debugging mode by appending &debug=true to the current URL.

    Enable debugging mode | Coveo
  5. In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain /rest/search/v2.

  6. Select the Preview tab.

  7. Find and expand the rankingExpressions property, and then validate whether the expression and modifier behave as expected.

    Ranking expression rule in developer tools | Coveo
  8. Access the Relevance Inspector:

    1. If your search interface leverages the Atomic library, select and hold Alt (Windows) or Option (Mac) and double-click any search interface element.

    2. In the modal that appears, select Open, and you’ll be redirected to the Coveo Administration Console. You may have to wait for your query to load.

    Note

    You can go directly to the Relevance Inspector (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console. If you do, you’ll need to rerun the query in the Relevance Inspector using the query’s SearchUid. You can find this value in the Preview tab of your network monitoring tool:

    Find the Search UID
  9. In the Relevance Inspector, the ranking expression rules are displayed under Query pipeline rules (the third step in the Query journey). Click See details for more information about the rule that was applied.

    Ranking expression rule in Relevance Inspector | Coveo

Query pipeline featured result rules let you display content at the top of the results list when specific conditions are met.

If a query pipeline contains featured result rules, we recommend that you review its configuration and test several entries in a search interface to ensure that the rules work as expected.

  1. In the Query Pipelines (platform-ca | platform-eu | platform-au) page of the Administration Console, select the query pipeline for which you want to review featured result rules configuration. Then, in the Action bar, click Edit components.

  2. Select the Result Ranking tab, and then click a featured result rule.

  3. In the Action bar, click Edit.

  4. Validate the featured result rule’s configuration and associated condition.

  1. Access the search interface in which you want to test a featured result rule.

  2. Access your browser’s network monitoring tool.

  3. In the search box, perform a query that would trigger a featured result rule.

  4. Enable debugging mode by appending &debug=true to the current URL.

    Enable debugging mode | Coveo
  5. Check whether the first item in the result list is the one that the rule must boost.

  6. In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain /rest/search/v2.

  7. Select the Preview tab.

  8. Find and expand the results property.

  9. Find the property that corresponds to the item that the rule must boost.

  10. Validate that the item has the isTopResult property with the true value.

    In the following capture, the Use the Coveo Atomic Library item is boosted by a featured result rule:

    Featured result rule in developer tools | Coveo
  11. Access the Relevance Inspector:

    1. If your search interface leverages the Atomic library, select and hold Alt (Windows) or Option (Mac) and double-click any search interface element.

    2. In the modal that appears, select Open, and you’ll be redirected to the Coveo Administration Console. You may have to wait for your query to load.

    Note

    You can go directly to the Relevance Inspector (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console. If you do, you’ll need to rerun the query in the Relevance Inspector using the query’s SearchUid. You can find this value in the Preview tab of your network monitoring tool:

    Find the Search UID
  12. In the Relevance Inspector, the featured result rules are displayed under Query pipeline rules (the third step in the Query journey). Click See details for more information about the rule that was applied.

    Featured result rule in Relevance Inspector | Coveo

Triggers

Query pipeline triggers define actions to execute in a search interface.

If a query pipeline contains trigger rules, we recommend that you review its configuration and test several entries in a search interface to ensure that the rules work as expected.

Review trigger rules configuration

  1. In the Query Pipelines (platform-ca | platform-eu | platform-au) page of the Administration Console, select the query pipeline for which you want to review trigger rules configuration. Then, in the Action bar, click Edit components.

  2. Select the Advanced tab, and then select Triggers.

  3. Validate the trigger rules' configuration and associated conditions.

Test trigger rules in a search interface

Coveo offers different types of trigger actions. The procedure to test them differs depending on the type of action the trigger rule leverages:

Notify

A Notify trigger rule displays a message in the search interface.

  1. Access the search interface in which you want to test a trigger rule.

  2. Access your browser’s network monitoring tool.

  3. In the search interface, reproduce the conditions that would launch a trigger rule (for example, performing a query).

  4. Enable debugging mode by appending &debug=true to the current URL.

    Enable debugging mode | Coveo
  5. Verify that the message is displayed as expected in the search interface.

  6. In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain /rest/search/v2.

  7. Select the Preview tab, and then find and expand the triggers property.

  8. Validate the values of the triggers property.

    In the following capture, the Notify trigger displays the text You searched for "atomic".:

    Notify trigger rule in developer tools | Coveo
  9. Access the Relevance Inspector:

    1. If your search interface leverages the Atomic library, select and hold Alt (Windows) or Option (Mac) and double-click any search interface element.

    2. In the modal that appears, select Open, and you’ll be redirected to the Coveo Administration Console. You may have to wait for your query to load.

    Note

    You can go directly to the Relevance Inspector (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console. If you do, you’ll need to rerun the query in the Relevance Inspector using the query’s SearchUid. You can find this value in the Preview tab of your network monitoring tool:

    Find the Search UID
  10. In the Relevance Inspector, the trigger rules are displayed under Query pipeline rules (the third step in the Query journey). Click See details for more information about the rule that was applied.

    Notify trigger rule in Relevance Inspector | Coveo

Query

A Query trigger rule forces the search interface to perform a new search using the query specified in the rule.

  1. Access the search interface in which you want to test a trigger rule.

  2. In the search box, perform a query that would launch a trigger rule.

  3. In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain /rest/search/v2.

  4. Select the Preview tab, and then find the basicExpression property.

  5. Verify that the value of the basicExpression property matches the query defined in the Query trigger rule. In the following capture, the Query trigger rule performed the query atomic when the user entered the query quantum:

    Query trigger rule in developer tools | Coveo
Note

You can’t validate a Query trigger rule in the Relevance Inspector.

Execute

An Execute trigger rule lets you specify JavaScript functions to execute in the user’s browser.

  1. Access the search interface in which you want to test a trigger rule.

  2. Access your browser’s network monitoring tool.

  3. In the search interface, reproduce the conditions that would launch a trigger rule (for example, performing a query).

  4. Enable debugging mode by appending &debug=true to the current URL.

    Enable debugging mode | Coveo
  5. In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain /rest/search/v2.

  6. Select the Preview tab, and then find and expand the triggers property.

  7. Validate the values of the triggers property.

    Execute trigger rule in developer tools | Coveo
  8. Access the Relevance Inspector:

    1. If your search interface leverages the Atomic library, select and hold Alt (Windows) or Option (Mac) and double-click any search interface element.

    2. In the modal that appears, select Open, and you’ll be redirected to the Coveo Administration Console. You may have to wait for your query to load.

    Note

    You can go directly to the Relevance Inspector (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console. If you do, you’ll need to rerun the query in the Relevance Inspector using the query’s SearchUid. You can find this value in the Preview tab of your network monitoring tool:

    Find the Search UID
  9. In the Relevance Inspector, the trigger rules are displayed under Query pipeline rules (the third step in the Query journey). Click See details for more information about the rule that was applied.

    Execute trigger rule in Relevance Inspector | Coveo

Redirect

A Redirect trigger rule redirects the user to a specific URL.

  1. Access the search interface in which you want to test a trigger rule.

  2. In the search interface, reproduce the conditions that would launch a trigger rule (for example, performing a query).

  3. Validate that you are redirected to the expected URL.

  4. In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain /rest/search/v2.

  5. Select the Preview tab, and then find and expand the triggers property.

  6. Validate the values of the triggers property.

    Redirect trigger rule in developer tools | Coveo
  7. Access the Relevance Inspector:

    1. If your search interface leverages the Atomic library, select and hold Alt (Windows) or Option (Mac) and double-click any search interface element.

    2. In the modal that appears, select Open, and you’ll be redirected to the Coveo Administration Console. You may have to wait for your query to load.

    Note

    You can go directly to the Relevance Inspector (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console. If you do, you’ll need to rerun the query in the Relevance Inspector using the query’s SearchUid. You can find this value in the Preview tab of your network monitoring tool:

    Find the Search UID
  8. In the Relevance Inspector, the trigger rules are displayed under Query pipeline rules (the third step in the Query journey). Click See details for more information about the rule that was applied.

    Redirect trigger rule in Relevance Inspector | Coveo

Query parameter rules

Query parameter rules can override query parameter values for every query that matches a condition.

If a query pipeline contains query parameter rules, we recommend that you review its configuration and test several entries in a search interface to ensure that the rules work as expected.

Review query parameter rules configuration

  1. In the Query Pipelines (platform-ca | platform-eu | platform-au) page of the Administration Console, select the query pipeline for which you want to review query parameter rules configuration. Then, in the Action bar, click Edit components.

  2. Select the Advanced tab, and then select Query parameters.

  3. Validate the query parameter rules' configuration and associated conditions.

Test query parameter rules in a search interface

  1. Access the search interface in which you want to test a query parameter rule.

  2. Access your browser’s network monitoring tool.

  3. In the search interface, reproduce the conditions that would trigger a query parameter rule (for example, performing a query).

  4. Enable debugging mode by appending &debug=true to the current URL.

    Enable debugging mode | Coveo
  5. In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain /rest/search/v2.

  6. Select the Preview tab.

  7. Find and expand the executionReport property, and then expand the children sub-property.

  8. Expand the ApplyQueryParamOverrideFeature property. If you see a value for the applied sub-property, this means that a query parameter rule was applied for this query.

  9. Expand the applied sub-property to see the definition of the rule that was applied.

    In the following capture, the rule overrides the enableQuerySyntax query parameter:

    Query parameter rule in developer tools | Coveo
  10. Access the Relevance Inspector:

    1. If your search interface leverages the Atomic library, select and hold Alt (Windows) or Option (Mac) and double-click any search interface element.

    2. In the modal that appears, select Open, and you’ll be redirected to the Coveo Administration Console. You may have to wait for your query to load.

    Note

    You can go directly to the Relevance Inspector (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console. If you do, you’ll need to rerun the query in the Relevance Inspector using the query’s SearchUid. You can find this value in the Preview tab of your network monitoring tool:

    Find the Search UID
  11. In the Relevance Inspector, the query parameter rules are displayed under Query pipeline rules (the third step in the Query journey). Click See details for more information about the rule that was applied.

    Query parameter rule in Relevance Inspector | Coveo

Filters

Query pipeline filter rules define the scope of the search results displayed to your users.

If a query pipeline contains filter rules, we recommend that you review its configuration and test several entries in a search interface to ensure that the rules work as expected.

Important

Filters, by themselves, don’t prevent the exposure of filtered content. We strongly advise against creating a source whose content is accessible to everyone and using a pipeline filter to exclude sensitive information.

In the following cases, sensitive content from a source whose content is accessible to everyone could be exposed:

  • A filter rule based on the aq query parameter is set on a query pipeline that contains an ART model for which the Match the advanced query option is disabled.

  • Using other pipelines not having a similar filter from other search interfaces or directly from the API.

  • A colleague not understanding the reason for the filter could modify or remove the filter.

You can ensure security by enforcing the search hub at the search token level (see Search token authentication). Moreover, search hubs defined on the client-side that are used as conditions in pipelines don’t safeguard the security of the filtered content.

Review filter rules configuration

  1. In the Query Pipelines (platform-ca | platform-eu | platform-au) page of the Administration Console, select the query pipeline for which you want to review filter rules configuration. Then, in the Action bar, click Edit components.

  2. Select the Advanced tab, and then select Filters.

  3. Validate the filter rules' configuration and associated conditions.

Test filter rules in a search interface

  1. Access the search interface in which you want to test a filter rule.

  2. Access your browser’s network monitoring tool.

  3. In the search interface, reproduce the conditions that would trigger a filter rule (for example, performing a query).

  4. Enable debugging mode by appending &debug=true to the current URL.

    Enable debugging mode | Coveo
  5. In the network monitoring tool, under the Name column, select the latest request to the Search API. The request path should contain /rest/search/v2.

  6. Select the Preview tab.

  7. Filter rules can take effect on the basic query expression (q), advanced query expression (aq), constant query expression (cq), disjunction query expression (dq), or large query expression (lq). Verify that the expression associated to this property matches the rule.

    In the following capture, the filter rule affects cq so that the search interface only displays items for which the value of the language field is english:

    Filter rule in developer tools | Coveo
  8. Access the Relevance Inspector:

    1. If your search interface leverages the Atomic library, select and hold Alt (Windows) or Option (Mac) and double-click any search interface element.

    2. In the modal that appears, select Open, and you’ll be redirected to the Coveo Administration Console. You may have to wait for your query to load.

    Note

    You can go directly to the Relevance Inspector (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console. If you do, you’ll need to rerun the query in the Relevance Inspector using the query’s SearchUid. You can find this value in the Preview tab of your network monitoring tool:

    Find the Search UID
  9. In the Relevance Inspector, the filter rules are displayed under Query pipeline rules (the third step in the Query journey). Click See details for more information about the rule that was applied.

    Filter rule in Relevance Inspector | Coveo