Adding and Managing Source Mappings

Members of the Administrators and Content Managers built-in groups can add and edit mappings.

Mappings define what Coveo index fields contain for each source item. This information typically comes from item metadata, but can also be a specific value for all source items.

A Coveo Cloud source needs mapping instructions to correctly copy the repository metadata values to appropriate index fields (see Understanding Fields).

Feature Push source All other source types
Default mappings
Automatically created mappings When matching metadata1 and Coveo index field names

Manually created mappings

  • When metadata names1 and destination field names are different

  • When the same value must be set for all source items

Note 1: Metadata names are case sensitive.

Access the “Edit the Mappings of a Source” Panel

  1. If not already done, log in to the Coveo Cloud organization as a member of a group with the required privileges to manage sources in the target Coveo Cloud organization.

  2. In the main menu on the left, under Content, select Sources.

  3. On the Sources page, click the source for which you want to manage mappings.

  4. In the Action bar, click More, and then select Manage mappings.

  5. In the Edit the Mappings of a Source panel, the Common tab is shown by default. Other tabs are Specific and JSON.

“Common” Tab

The Common tab displays mappings that apply to all source item types.

The information you can review in this tab is the following:

“Specific” Tab

The Specific tab displays mappings that apply only to certain source item types.

The information you can review in this tab is the following:

  • Left pane

    Item type column: item types names.

    Click an item to display the corresponding item-type-specific mappings in the right pane.

  • Right pane

“JSON” Tab

The JSON tab shows the source mapping rules in JSON format. Any modification made in the Common and Specific tabs automatically updates the JSON accordingly, and vice versa. You can review this raw source configuration for troubleshooting purposes, but you can also modify the configuration itself.

The content displayed in the JSON tab is similar to that in the Mappings tab of the Edit a Source JSON Configuration panel (see Edit a Source JSON Configuration). Therefore, the following instructions apply to both panels:

Access the “JSON” Tab

  1. On the Sources page, click the source for which you want to manage mappings.

  2. In the Action bar, click More, and then select Manage mappings.

  3. In the Edit the Mappings of a Source: [SourceName] panel, select the JSON tab.

Manage Mappings

Add an Item Type

Adding an item type allows you to apply a mapping rule only to items of this specific type, rather than to all source item types (see Source Item Types).

  1. In the Edit the Mappings of a Source panel, click the Add drop-down menu, and then select Item type.

  2. In the Add an Item Type dialog, click the drop-down menu and select or create an item type, and then click Add Type (see Source Item Types).

  3. In the Edit the Mappings of a Source panel:

    • Clicking Save defers the source rebuild operation, which is necessary to apply changes. Since a source with several millions of items may take weeks to rebuild, choosing the Save option when possible prevents stressing the Coveo Cloud and system server resources. It is therefore recommended to click Save when you plan on making additional changes in the short term, and then to click Save and Rebuild once you are ready to update your source.

    • Item types with no associated mapping rules are deleted when you save your changes.

  4. If you clicked Save, back in the Sources page, under the source Status column, click Start required rebuild when you are ready or wait for the next scheduled source rebuild to make the changes effective.

Add or Edit a Mapping Rule

The following procedure allows you to apply a mapping rule to your source or edit an existing mapping rule.

  1. Access the Apply/Edit a Mapping on All/Specific Item Types of a Source: [SourceName] dialog:

    • To add a mapping rule: in the Edit the Mappings of a Source: [SourceName] panel, click the Add drop-down menu, and then select Mapping.

      OR

    • To edit a mapping rule: in the Edit the Mappings of a Source: [SourceName] panel:

      1. Access the “Common” tab or the “Specific” tab.
      2. In the Common or the Specific tab, double-click the mapping rule you want to edit.
  2. In the Apply/Edit a Mapping on All/Specific Item Types of a Source: [SourceName] dialog:

    1. Under Field, select the field to which the mapping rule should apply:

      • Click the drop-down menu and select the desired field to which the mapping rule should apply. You can also start typing the desired field name to filter your options.

        You can edit most of the fields in the list by clicking Edit Field (see Add or Edit a Field).

        OR

      • Click Add Field to add a new field (see Add or Edit a Field).

    2. Under Apply to, click All items (common) or Specific item types to determine to which items the mapping rule should apply.

    3. (If you selected Specific item types) Select the items types to which the mapping should apply.

    4. Under Rules, enter one or more mapping rules to apply to the selected items (see Mapping Rule Syntax Reference). Click the plus sign to add an additional rule.

    5. Click Apply if you are adding a mapping rule, and Save if you are editing a mapping rule.

  3. In the Edit the Mappings of a Source: [SourceName] panel:

    • If you are done adding and editing mapping rules, click Save and Rebuild.

      OR

    • If you want to add or edit other mapping rules, click Save.

    Clicking Save defers the source rebuild operation, which is necessary to apply changes. Since a source with several millions of items may take weeks to rebuild, choosing the Save option when possible prevents stressing the Coveo Cloud and system server resources. It is therefore recommended to click Save when you plan on making additional changes in the short term, and then to click Save and Rebuild once you are ready to update your source.

  4. If you clicked Save, back in the Sources page, under the source Status column, click Start required rebuild when you are ready or wait for the next scheduled source rebuild to make the changes effective.

Edit an Item Type Name

  1. In the Edit the Mappings of a Source: [SourceName] panel, access the “Specific” tab.

  2. In the Specific tab:

    • Double-click the item type that you want to modify.

      OR

    • Click the desired item type, and then click Edit in the Action bar.

  3. In the Edit an Item Type: [ItemTypeName] dialog, edit the item type name, and then click Save.

  4. Back in the Edit the Mappings of a Source: [SourceName] panel:

    • If you are done adding and editing items and mapping rules, click Save and Rebuild.

      OR

    • If you want to add or edit other items and mapping rules, click Save.

    Clicking Save defers the source rebuild operation, which is necessary to apply changes. Since a source with several millions of items may take weeks to rebuild, choosing the Save option when possible prevents stressing the Coveo Cloud and system server resources. It is therefore recommended to click Save when you plan on making additional changes in the short term, and then to click Save and Rebuild once you are ready to update your source.

  5. If you clicked Save, back in the Sources page, under the source Status column, click Start required rebuild when you are ready or wait for the next scheduled source rebuild to make the changes effective.

Search an Item Type or Mapping Rule

  1. In the Edit the Mappings of a Source: [SourceName] panel, access the “Common” tab or the “Specific” tab.

  2. In the Common or the Specific tab, on the right end of the Action bar, click the Filter box.

  3. Enter the desired field name or mapping rule.

    The filter applies automatically as you type.

Delete an Item Type or Mapping Rule

  1. In the Edit the Mappings of a Source: [SourceName] panel, access the “Common” tab or the “Specific” tab.

  2. In the Common or Specific tab, click the item type or mapping rule you want to delete, and then in the Action bar, click Delete.

Rebuild Source to Take Account of Mapping Rule Changes

Once you are done adding or editing mapping rules, in the Edit the Mappings of a Source: [SourceName] panel, click Save and Rebuild to apply your changes.

What’s Next?

Ensure that your mapping works as expected in the Content Browser (see Fields Tab).