Code query pipeline rules
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.
|
Note
You can edit Coveo Machine Learning (Coveo ML) models using JSON configurations. |
Add query pipeline rules with code
-
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.
-
On the selected pipeline page, select the tab for the type of rule that you want to code.
-
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
, and then click Add rule with code.
-
-
In the Add a rule with code dialog:
-
Enter a rule that follows the query pipeline language syntax.
-
Click Add with code.
NoteIf 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
Validate that your new rule performs as desired by checking the pipeline performance. |
Edit query pipeline rules with code
-
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.
-
On the selected pipeline page, select the tab for the type of rule you want to edit with code.
-
Select the rule you want to edit, and click More > Edit code.
-
In the Edit a rule with code dialog:
-
Modify your rule, ensuring it follows the Query pipeline language (QPL) syntax.
-
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 |
|
View |
Add and edit query pipeline rules with code |
Organization - Organization |
View |
Search - Query pipelines |
Edit |