Apply an Extension to a Source
Apply an Extension to a Source
An indexing pipeline extension (IPE) is a Python script that you add to your Coveo organization that customizes the way you include source items in your organization.
Once an indexing pipeline is available in your organization, from the Coveo Administration Console, you can easily apply the extension to a source so that it’s run for source items which go through the indexing pipeline.
An extension can be Common, applying to all item types of a source, or Specific, applying only to specified item types, in which case you must first define the item types available in your source.
To apply an extension to a source:
-
Log in to the Administration Console (platform-ca | platform-eu | platform-au) as a member of a group with the required privileges to manage extensions in the target organization, if not already done.
-
Ensure that your extension is available in your organization. If required, you can edit your indexing pipeline extension.
-
On the Sources (platform-ca | platform-eu | platform-au) page, click the source that you want to apply your extension to, and then click More > Add extensions in the Action bar.
-
In the Add extensions panel, select the Specific or Common tab, depending on which type of extension you would like to add.
When applying a Specific extension, verify that the desired item types appear in the Item type list. If there are no item types listed, add the item type.
Leading practiceTo minimize indexing time, apply an extension only to applicable source item types.
-
In the upper-right corner, click Add > Extension.
-
From the Extension dropdown menu, within the Apply an Extension on Source Items panel, select the name of the extension that you want to apply to the source.
-
You can also edit the selected extension by clicking Edit Extension.
-
If there are no existing extensions click Add Extension to create a new extension.
-
-
Under Stage, select Pre-Conversion or Post-Conversion to determine at what indexing pipeline stage the extension runs.
-
Under Action on Error, select Reject Document to prevent the items from indexing if there’s an error in the extension, or select Skip Extension if you want to index the items regardless of an error.
Examples-
Your extension adds metadata to items for facets and filters that aren’t business-critical. Select Skip Extension to ensure that the items are indexed regardless. You can fix the issue afterward and then refresh the source.
-
The extension adds permissions to items or adds a field which will hide the items from a specific audience. Select Reject Document to ensure that the items don’t advance in the indexing pipeline so that no sensitive content is indexed.
-
-
Under Apply to, select All items (common) to run the extension for all source items.
If you only want it to run for particular source items, select Specific item types and then check the boxes of the desired item types.
-
If you see The source must contain at least one item type when selecting Specific item types, you must first define them.
-
-
(Optional) In the Conditions to apply parameter, enter one or more expressions respecting the condition syntax.
Leading practiceTo minimize indexing time when the extension is relevant only to specific source items that can’t be filtered by their item types, you should set a condition determining to which items the extension applies.
ExampleYou create an extension that seeks specific
tags
metadata values entered by end users to determine how to populate aproducts
metadata with normalized product name values. Running this extension when an item has notags
metadata values would waste resources and decrease indexing speed.You add the condition
NOT @tags==''
that’strue
for an item only when itstags
field isn’t empty. -
Click Add. The extension now appears under the Common or Specific tab, depending on your selection.
-
Choose how you would like to save your changes:
-
Click Save and Rebuild to save your configuration changes, force all source items to go through the indexing pipeline, and run the extension.
-
Click Save when you want to make some other changes to the source configuration before rebuilding, or when you want to rebuild your source at a specific time in the future.
-
-
Validate that your extension script ran properly:
-
Ensure that the extension ran without errors by checking the Extensions (platform-ca | platform-eu | platform-au) page and, in particular, the Usage statistics panel.
-
Check whether your script affected the items as expected. For example, you can inspect items with the Content Browser.
-
If your extension script writes error or troubleshooting logs, navigate to the Administration Console Log Browser (platform-ca | platform-eu | platform-au) page to find these logs.
-
Note
You can use the JSON tab to inspect your source extension configuration and perform more advanced configurations. |