--- title: Apply an extension to a source slug: '1936' canonical_url: https://docs.coveo.com/en/1936/ collection: index-content source_format: adoc --- # Apply an extension to a source An [indexing pipeline extension (IPE)](https://docs.coveo.com/en/206/) is a Python script that you add to your [Coveo organization](https://docs.coveo.com/en/185/) that customizes the way you include [source](https://docs.coveo.com/en/246/) items in your organization. Once an [indexing pipeline](https://docs.coveo.com/en/1556/) is available in your organization, from the [Coveo Administration Console](https://docs.coveo.com/en/183/), you can easily apply the extension to a source so that it's run for source [items](https://docs.coveo.com/en/210/) which go through the [indexing pipeline](https://docs.coveo.com/en/184/). 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](https://docs.coveo.com/en/1965/) available in your source. **To apply an extension to a source:** . Log in to the [Administration Console](https://platform.cloud.coveo.com/login) ([platform-ca](https://platform-ca.cloud.coveo.com/login) | [platform-eu](https://platform-eu.cloud.coveo.com/login) | [platform-au](https://platform-au.cloud.coveo.com/login)) as a [member](https://docs.coveo.com/en/2869/) of a [group](https://docs.coveo.com/en/2867/) with the [required privileges](https://docs.coveo.com/en/1645#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](https://docs.coveo.com/en/1645/). . On the [**Sources**](https://platform.cloud.coveo.com/admin/#/orgid/content/sources/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/sources/)) 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](https://docs.coveo.com/en/2001#add-an-item-type). > **Leading practice** > > To 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](https://docs.coveo.com/en/2001/) by clicking **Edit Extension**. * If there are no existing extensions click **Add Extension** to [create a new extension](https://docs.coveo.com/en/1645/). . Under **Stage**, select [**Pre-Conversion** or **Post-Conversion**](https://docs.coveo.com/en/1556#PreVsPost) 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](https://docs.coveo.com/en/129/), or select **Skip Extension** to index the items regardless of an error. **Examples** * Your extension adds metadata to items for [facets](https://docs.coveo.com/en/198/) and [filters](https://docs.coveo.com/en/2736/) 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](https://docs.coveo.com/en/2001#add-an-item-type). . (Optional) In the **Conditions to apply** parameter, enter one or more expressions respecting the [condition syntax](https://docs.coveo.com/en/64/). > **Leading practice** > > To 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. **Example** You create an extension that seeks specific `tags` metadata values entered by end users to determine how to populate a `products` metadata with normalized product name values. Running this extension when an item has no `tags` metadata values would waste resources and decrease indexing speed. You add the condition `NOT @tags==''` that's `true` for an item only when its `tags` 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**](https://platform.cloud.coveo.com/admin/#/orgid/content/extensions/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/extensions/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/extensions/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/extensions/)) 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](https://docs.coveo.com/en/2053/). .. If your extension script writes error or troubleshooting logs, navigate to the Administration Console [**Log Browser**](https://platform.cloud.coveo.com/admin/#/orgid/logs/browser/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/logs/browser/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/logs/browser/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/logs/browser/)) page to find [these logs](https://docs.coveo.com/en/1864/). > **Note** > > You can use the **JSON** tab to inspect your source extension configuration and perform [more advanced configurations](https://docs.coveo.com/en/1943/).