--- title: About the search result title selection sequence slug: '2571' canonical_url: https://docs.coveo.com/en/2571/ collection: coveo-for-sitecore-v5 source_format: adoc --- # About the search result title selection sequence The title of an [item](https://docs.coveo.com/en/210/) is the first thing you see in a search result. This article explains the default title selection sequence and how to customize the behavior to suit specific needs. ## Item title information collection process Coveo for Sitecore collects several pieces of information that can be used for the item title and sends this information as [metadata](https://docs.coveo.com/en/218/) to the [Coveo Platform](https://docs.coveo.com/en/186/). Then, in the [Coveo indexing pipeline](https://docs.coveo.com/en/184/), a [converter](https://docs.coveo.com/en/2735/) also extracts metadata from the item that can be used as the item title. Collecting all this title metadata ensures each item has a metadata value which it can [map](https://docs.coveo.com/en/217/) to the `title` [Coveo field](https://docs.coveo.com/en/2551/). The following diagram summarizes the default `title` metadata collection process of an HTML item and how the `title` Coveo field value is determined. ![Image of title metadata collected by Coveo for Sitecore and extracted in DPM | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/title-selection-sequence.png) Besides the way a value is assigned to the `processing stage title metadata`, the process is the same for all types of Sitecore items. This behavior yields adequate item titles most of the time. If it doesn't in your use case, you can [customize your result titles](#customize-your-result-titles). ## Customize your result titles What determines the metadata to be used for the `title` Coveo field is the mapping rule configured for this field in your [Coveo organization](https://docs.coveo.com/en/185/) source. Coveo for Sitecore configures sources with the default `%[title]` mapping rule, but you can edit this mapping to suit your needs. > **Note** > > After editing the default `%[title]` mapping rule in your Coveo organization source and performing an indexing action in Sitecore, you'll notice that Coveo for Sitecore adds another default `%[title]` rule to the one you defined. > This is expected. > > For example, you edit the `%[title]` rule and change it to `%[title:crawler]`. > After reindexing, you'll see two rules for the `title` field. > > ![Coveo for Sitecore re-adds the default mapping rule after an indexing action | Coveo for Sitecore 5](:https://docs.coveo.com/en/assets/images/c4sc-v5/two-rules-after-editing.png) > > When multiple rules are defined, [the first rule is applied when possible](https://docs.coveo.com/en/1839#mapping-rule-evaluation) (in this example, `%[title:crawler]`). You can change a mapping rule in two ways: * By changing the [origin^,role='glossarylink',force_render='true'](https://docs.coveo.com/en/219/) parameter in the rule to [select the crawling stage metadata](#use-the-crawling-stage-metadata-for-the-item-title). * By [changing the `metadata` to use](#use-another-metadata-for-example-name-display-name-for-the-item-title) (that is, using a different Sitecore template field). ### Use the crawling stage metadata for the item title Coveo for Sitecore has a [crawling stage `title` metadata](#item-title-information-collection-process) fallback selection process. Coveo for Sitecore then sends the item to Coveo with its crawling stage `title` metadata value. In the case of HTML items, the processing stage `title` metadata extracted from the HTML content will be considered over the crawling stage `title` metadata. You might want your item search result titles to be the ones Coveo for Sitecore sends as the crawling stage `title` metadata values. If so, you can edit the `title` field mapping rule `origin` parameter so that it uses the crawling stage `title` metadata value. To set the `title` field mapping rule `origin` parameter to `crawler` . 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 target source, and then click **Mappings** in the Action bar. ![Selecting the Manage Mapping option on a source](https://docs.coveo.com/en/assets/images/c4sc-v5/manage-mappings.png) . In the **Edit mappings** panel, click the **title** field, and then click **Edit**. . Change the existing rule to `%[title:crawler]`. ![Setting the origin to crawler in the mapping rule | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/title-crawler-mapping-rule.png) . Click **Apply mapping**, and then click **Save**. . In your Sitecore instance, [reindex the items](https://docs.coveo.com/en/2426/) you want to apply the new mapping to. You can now validate the titles by [inspecting your source items in the Content Browser](https://docs.coveo.com/en/2053/). ### Use another metadata (for example, `Name`, `Display Name`) for the item title Coveo for Sitecore automatically sends the Sitecore item `Name` and `Display name` to Coveo as the `_name` and `_displayname` metadata respectively. You can use this metadata instead of the `title` metadata for your item titles. To use the `_displayname` metadata in the `title` field mapping rule . 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 you want to target, and then click **Mappings** in the Action bar. ![Selecting the Manage Mapping option on a source | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/manage-mappings.png) . In the **Edit mappings** panel, click the **title** field, and then click **Edit**. . Change the existing rule to `%[_displayname]`. ![Using the display name in the mapping rule | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/title-mapping-rule-using-display-name.png) . Click **Apply mapping**, and then click **Save**. . In your Sitecore instance, [reindex the items](https://docs.coveo.com/en/2426/) you want to apply the new mapping to. You can now validate the titles by [inspecting your source items in the Content Browser](https://docs.coveo.com/en/2053/). > **Other metadata you can use** > > You can use any [included Sitecore template field](https://docs.coveo.com/en/2566#fields) as the metadata in your mapping rules, not only `Name` and `Display name`. > You might be able to find another appropriate metadata to use for your mapping by reviewing your source item field values, as follows: > > . Locate an appropriate item title by [reviewing the field values indexed in the properties of a given indexed item](https://docs.coveo.com/en/1712/) (see item 1 in screenshots below). > > . Get the name of the corresponding Coveo field (see item 2 in screenshots below). > > . Search for that field in your [source mappings](https://docs.coveo.com/en/1640#navigating-the-edit-mappings-panel) (see item 3 in screenshots below). > > . Get the metadata name from the mapping rule for that field (see item 4 in screenshots below). > > [.float-group] > -- > ![First steps to finding the right metadata to use | Coveo for Sitecore 5](c4sc-v5/meta-to-use-steps-1-and-2.png) > ![Last steps to finding the right metadata to use | Coveo for Sitecore 5](c4sc-v5/meta-to-use-steps-3-and-4.png) > -- > > Mapping rules aren't limited to a single metadata. > You can [create rules with multiple metadata names](https://docs.coveo.com/en/1839/) and even mix in some text (for example, `Miss %[firstName] %[lastName]`). #### Set the title metadata for a specific media item type Mapping rules are usually applied to all source items. You can be more granular and apply a mapping rule only to items of a specific type. ##### Example: You want to create a mapping rule so that all PDF items use the `Display name` value as their title. > **Note** > > The Sitecore item `Display name` is sent to the Coveo index as the `_displayname` metadata. . 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 you want to target, and then click **Mappings** in the Action bar. ![Selecting the Manage Mapping option on a source | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/manage-mappings.png) . In the **Edit mappings** panel, select the **Specific** tab. . In the upper-right corner, click **Add** > **Item type**. . In the **Add an Item Type** panel, click **Select or create an item type**, type `pdf` in the **Filter** field, and then select Enter. ![Adding the pdf item type | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/add-the-pdf-item-type.png) > **Tip** > > For help on determining the item type value to use for a given file type, see [Find the source item type values](https://docs.coveo.com/en/1965#find-the-source-item-type-values). . Click **Add type**. . In the **Edit mappings** panel, click **Add** > **Mapping** in the upper-right corner. . Configure your mapping as follows: **Field**: `title` **Apply to**: `Specific item types` > `pdf` **Rules**: `%[_displayname]` . Click **Apply mapping**. . In the **Edit mappings** panel, click **Save**. . In your Sitecore instance, [perform an indexing action on your media items](https://docs.coveo.com/en/2426/). You can now validate your media item titles by [inspecting your source items in the Content Browser](https://docs.coveo.com/en/2053/).