Adding and Managing Source Mappings

Administrators and content managers can add and edit mappings.

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

A Coveo Cloud source needs mapping files 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.

“Common” Tab

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

Access the “Common” Tab

  1. If not already done, log in to the Coveo Cloud platform 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 Manage mappings.

Reference

The information you can review in the Common tab is:

“Specific” Tab

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

Access the “Specific” Tab

  1. If not already done, log in to the Coveo Cloud platform 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: [SourceName] panel, select the Specific tab.

Reference

The information you can review in this tab is:

“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: [SourceName] panel (see Edit a Source JSON Configuration). Therefore, the following instructions apply to both panels:

Access the “JSON” Tab

  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: [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: [SourceName] panel, click the Add drop-down menu, and then select Item type.

  2. In the Add an Item Type dialog, enter the Item type name, and then click Add (see Source Item Types).

  3. In the Edit the Mappings of a Source: [SourceName] 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 already 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 Fields).

        OR

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

    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).