View the metadata of a source

Once you have created a source, you must add mapping rules for Coveo to index your content metadata. Coveo offers a subpage displaying a summary of the metadata it found in a sample of your content. This information lets you see some of the metadata keys that appear in your content and which values each key typically holds. This helps you determine whether each piece of metadata would be useful in a Coveo-powered search interface, and therefore whether you need to create a mapping rule to index this information.

About metadata

Content metadata is data found within the items you index with your source. It’s likely that you’ll want to index at least part of your content metadata to take advantage of Coveo-powered search interface features such as facets, which let users filter out search results that have or haven’t the desired metadata values.

In your content system, metadata is stored in key-value pairs, and each pair holds a piece of data about a piece of content. For example, the date on which a content item was created is a piece of metadata. It can be stored as Date_Created: 2022-09-30 11:10 AM UTC, where Date_Created is the key and 2022-09-30 11:10 AM UTC is its value.

A mapping rule links a piece of your content metadata to a field in your Coveo index. It contains the name of the metadata key as it appears in your content system and is associated with a field of the Coveo index. A mapping rule indicates to Coveo which metadata value to retrieve and index as the value of a certain field.

Example

In your content repository, the name of document authors is saved as two separate pieces of data: the author’s first name (First_Name key) and their last name (Last_Name key).

The Author facet in Coveo-powered search interfaces uses the @author default field, which typically contains full names. Author names therefore appear in full in the facet. To use this facet, you want Coveo to index both the first and last names as a single piece of data.

To do so, you create the following mapping rule for the @author field: %[First_Name] %[Last_Name]. As a result, for a document whose metadata contains First_Name: John and Last_Name: Smith, Coveo will index "author": "John Smith". In a Coveo-powered search interface, the Author facet will therefore display John Smith as an option.

Only the metadata that’s covered by a mapping rule is indexed and can be used to build a search interface. While Coveo automatically creates some mapping rules for you, it’s likely you’ll need to edit them and/or add more to index exactly the information you want. To help you with this process, the View and map metadata subpage showcases some of your metadata that Coveo found within your content, but hasn’t already indexed with a mapping rule. You should use it to see if there’s any additional information you want to index and use in your search interface.

"View and map metadata" subpage

To help you decide what to index, Coveo samples your items during the indexing process. You’ll learn more about the sampling process in the Item sampling criteria section below.

Then, the View and map metadata subpage displays a summary of the available metadata across the items in the sample. Its insight about the occurrence of keys and values should help you determine what to use in your Coveo-powered search interface.

For example, if you see that the language key appears in the metadata of 90% of the items in the sample, you may consider indexing this metadata to create a Language facet in your search interface. However, to make this decision, you should also consider the values of the language key. If the language key has only one value, it may not be useful to index it, as it won’t allow users to filter out items on your search page.

To access the View and map metadata subpage, on the Sources (platform-ca | platform-eu | platform-au) page, select the desired source, and then, in the More menu, select View and map metadata.

On the View and map metadata subpage:

  • The Indexed column indicates whether this metadata is stored in your Coveo index, for example due to being part of a mapping rule.

  • The Metadata Name column shows the metadata keys found in the content sample.

  • The Origin column shows at which step of the indexing pipeline Coveo discovered each metadata key. The most common values are Crawler and Converter, but the column can also show the name of an indexing pipeline extension that applies to your source. This information can also be used when writing rules.

  • The Example value is the value that’s the most common in the sample. Expand the key row to show additional values.

  • The Occurrences in sample column shows the percentage of items in the sample that have this key in their metadata. For example, if Coveo considered a sample of 50 items and the language key appears in the metadata of 45 of these items, the column shows 90%.

Expanding a key row reveals the five most frequent values in the items that have the selected key in their metadata. For example, let’s say in a sample of 50 items, 45 have the language key in their metadata. If you expand the language row, you’ll see that the value English is the most common within these 45 items, as it appears in 30 of them. French is the second most common, as it appears in 10 of the 45 items, etc.

Index metadata

On the View and map metadata subpage, click the metadata you want to store in your Coveo index and then, click Add to index in the Action bar. In the panel that opens, select a field and enter a mapping rule that contains the metadata key you selected.

Note

The metadata will be indexed during the next source rebuild (or item push for Push and Catalog sources).

Review mapping rules

On the View and map metadata subpage, click the desired indexed metadata. A View mapping button appears in the Action bar. Click View mapping to open the Edit mappings panel.

Summary representativeness and freshness

The View and map metadata subpage displays a summary of the metadata found in a sample of indexed items. As a result, it only shows a fraction of the metadata available across your content system.

When you launch a source build or rebuild, Coveo progressively indexes your content system. At the beginning of the operation, the indexed content represents only a fraction of your system.

When you visit the View and map metadata subpage, Coveo creates a summary of the metadata found in a sample of the content indexed at that time. Therefore, your summary, especially at the beginning of the indexing process, may not be representative of the metadata in your system.

Large sources may take several days to complete a build or rebuild operation. However, you can start reviewing your summary and planning mapping rules additions early in the process and click Refresh to get an updated summary as the indexing progresses.

A summary remains available for 48 hours. After this time, it will be refreshed when the View and map metadata subpage is visited again, taking into account any content update that may have occurred in the meantime. So, if your source takes four days to rebuild, the metadata you’ll see on the first day is likely to be different from that you’ll see 48 hours later and at the end of the process.

Item sampling criteria

Within the content it indexes, Coveo typically selects the items to include in the sample based on their uniqueness, values, or novelty, among other factors, to offer you a broad and relevant overview. For example, if an item has a new metadata key, it’s likely to be selected. Conversely, an item that has exactly the same metadata as multiple others in the content system is less likely to be selected.

Required privileges

The following table indicates the privileges required for members to access the View and map metadata subpage (see Manage privileges and Privilege reference).

Action Service - Domain Required access level
Access the View and map metadata page Content - Source metadata View
Content - Sources
On the desired sources
Edit
Organization - Organization View