Exporting and Importing Query Pipeline Elements

When you have created query pipeline elements (query pipeline rules and Coveo Machine Learning (Coveo ML) models) and tested their effectiveness, you may want to reuse them. The import and export features allow members of the Administrators and Relevance Managers built-in groups to easily copy query pipeline elements and reuse them in another query pipeline or Coveo Cloud organization.

Coveo ML models can only be imported and exported within the same organization.

Access the “Import” or “Export” Panel

  1. On the Query Pipelines page, click the desired pipeline.

  2. In the Action bar, click More, and then click Import or Export.

Export Query Pipeline Elements

  1. Access the “Export” panel.

  2. In the Export panel, select the type of pipeline element you want to export.

    Export Panel

    The data is exported to a CSV file in the Downloads folder of your browser.

Import Query Pipeline Elements

  1. Access the “Import” panel.

  2. In the Import/Export panel:

    1. Click Select a file, and then select the desired CVS file.

    2. Select the type of query pipeline element to import from the selected file.

    3. Click Import.

Import Panel

Creating CSV Files for Importation

If you have a set of rules that you want to create for your organization, you can write them all in a CSV file which you can then import into your pipeline. This allows you to import multiple rules at once without having to manually create them using the [Query_Pipeline_Name] page.

You can use the following template in a spreadsheet to create your rules:

Csv

Definition

In this column, enter rules using the proper query pipeline language (QPL) syntax:

Condition

In this column, enter rules using the proper QPL syntax.

Description

In this column, you can enter a message to be displayed in the User Note column of the [Query_Pipeline_Name] page.

Feature

In this column, enter the Search API name of the query pipeline feature you’re creating.

Once you have properly formatted your spreadsheet, ensure that you save the document in the CSV file format. You can then use this document to import your query pipeline elements.

Exporting and Importing Query Pipeline Rules Between Organizations

You can’t import Coveo ML models from a different organization.

You may have more than one Coveo Cloud organization, typically a sandbox organization and a production organization. Once you have tested a given query pipeline configuration change in your sandbox organization, you may want to apply this change to your production organization. If you recreate your configuration changes from scratch in the production organization, there’s a risk of introducing errors. Instead, you should use the exportation and importation features to transfer pipeline elements from one organization to another.

  1. Access the Coveo Cloud organization from which you want to import query pipeline rules, and then access the “Import” or “Export” panel.

  2. Export the desired query pipeline rules.

  3. Switch to the organization in which you want to import the pipeline rules.

  4. Access the “Import” or “Export” panel.

  5. Import the desired query pipeline rules.

Recommended Articles