View the metadata of a source
View the metadata of a source
Once you’ve 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 should 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.
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
languagekey appears in the metadata of 45 of these items, the column shows90%.
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, if the metadata you want to index doesn’t already show as Indexed, click it.
NoteIf your metadata shows as Indexed, a mapping and a field already exist for that metadata. To determine which field the metadata is indexed in or to edit the mapping, see Review indexed metadata.
-
Click Add to index in the Action bar.
-
In the Add mapping panel, select an existing field or add a new one.
To add a field
-
Click Add field.
-
In the Add a field panel, enter a name for the field and configure its settings. For example, if you’re indexing the
audiencemetadata of a document and the audience can contain multiple values, select Multi-value facet.NoteApart from the Type setting, you can edit the field options later if needed.
-
When you’re done, click Add field.
-
-
Under Apply to, leave the default Common value if you want your mapping to apply to all item types or select Specific to specify the applicable item types.
-
Under Rules, Coveo suggests a mapping rule (for example,
%[audience]or%[audience:crawler]) based on the metadata name you selected. You can edit this rule now or later if needed. -
Click Add mapping.
-
For sources other than Push and Catalog, rebuild your source.
NoteFor Push and Catalog sources, the metadata will be indexed on the next Push API or Stream API content update operation.
Review mapping rules
When the View and map metadata subpage marks metadata as Indexed, a user-defined mapping rule or automatic mapping has stored that metadata in a field.
The mapping mechanism determines which button appears in the Action bar and which actions are available from that button:
| How the metadata is indexed | Action bar button | Available actions |
|---|---|---|
A user-defined mapping rule indexes it |
Mappings |
|
Automatic mapping indexes it |
View field |
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 for details.
| Action | Service | Domain | Required access level |
|---|---|---|---|
Access the View and map metadata page |
Content |
Sources |
Edit |
Source metadata |
View |
||
Organization |
Organization |
View |