Code Query Pipeline Rules

Coveo organization members with developer skills can use the Query Pipeline Language (QPL) syntax to create more flexible query pipeline rules.

You can create Coveo Machine Learning (Coveo ML) models using JSON configurations (see Creating a Model With JSON).

To code query pipeline language rules

  1. Ensure that you log in to the Coveo Platform as a member of a group with the required privileges to manage query pipeline components in the target Coveo organization, if not already done.

  2. In the main menu on the left, under Search, select Query Pipelines.

  3. On the Query Pipelines page, click the query pipeline for which you want to code rules, and then in the Action bar, click Edit Components.

  4. On the selected pipeline page, select the tab for the type of rule that you want to code.

  5. On the selected component subpage, click Menu, and then click Add rule with code.

  6. In the Add a Rule With Code dialog:

    Admin-CreateRuleCode3

    1. Enter a rule respecting the query pipeline language syntax [see Query Pipeline Language (QPL)].

    2. Click Add Rule.

    If you try to use this interface to extend the Coveo Cloud query pipeline behavior (e.g., by entering JavaScript code), you will receive an error message:

    The definition of the statement is syntactically invalid.

  7. You can perform other actions on your rule (see Manage Query Pipeline Rules and Rule Conditions From Tabs).

  8. Validate that your new rule performs as desired (see Test Query Pipeline Changes or Testing Coveo Machine Learning Models).

Required Privileges

By default, members of the Administrators and Relevance Managers built-in groups can view and edit elements of the Query Pipelines page.

The following table indicates the required privileges to view or edit elements of the Query Pipelines page, and associated panels and subpages (see Manage Privileges and Privilege Reference).

Action Service - Domain Required access level
View query pipeline rules

Search - Query pipelines

View
Add and edit query pipeline rules with code

Search - Query pipelines

Edit
Recommended Articles