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 use code to add or edit thesaurus rules, filters, ranking weights, and trigger rules.

Add query pipeline rules with code

  1. On the Query Pipelines (platform-ca | platform-eu | platform-au) page, click the query pipeline for which you want to code rules, and then click Edit components in the Action bar.

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

  3. On the selected rule subpage, do one of the following:

    • If this is the first rule you’re adding, click Add rule with code.

    • If you’re adding a rule to an existing list of rules, click dots, and then click Add rule with code.

  4. In the Add a rule with code dialog:

    Coveo | Add rule with code
    1. Enter a rule that follows the query pipeline language syntax.

    2. Click Add with code.

      Note

      If you try to use this interface to extend the Coveo query pipeline behavior (for example, by entering JavaScript code), you’ll receive an error message:

      The definition of the statement is syntactically invalid.

Tip
Tip

Validate that your new rule performs as desired by checking the pipeline performance.

Edit query pipeline rules with code

  1. On the Query Pipelines (platform-ca | platform-eu | platform-au) page, click the query pipeline for which you want to code rules, and then click Edit components in the Action bar.

  2. On the selected pipeline page, select the tab for the type of rule you want to edit with code.

  3. Select the rule you want to edit, and click More > Edit code.

  4. In the Edit a rule with code dialog:

    1. Modify your rule, ensuring it follows the Query pipeline language (QPL) syntax.

    2. Click Save.

Required privileges

By default, members of the Administrators and Relevance Managers built-in groups can view or edit elements of the Query Pipelines (platform-ca | platform-eu | platform-au) page.

The following table indicates the required privileges to view or edit elements of the Query Pipelines page, and associated panels. Learn more about the Privilege reference and how to manage privileges.

Action Service - Domain Required access level

View query pipeline rules

  • Organization - Organization

  • Search - Query pipelines

View

Add and edit query pipeline rules with code

Organization - Organization

View

Search - Query pipelines

Edit