Configure the items and fields processed by Sitecore Cortex Content Tagging

Version:

By default, the Sitecore CortexTM Content Tagging feature can process any content item in Sitecore. When an item is processed for tagging, the content of every content field is processed. However, if you use a custom content provider, you can determine which items and fields are included in the tagging process.

To change the default behavior of Sitecore Cortex Content Tagging, you can build your own content provider and use it through the extension points that Sitecore Cortex Content Tagging provides.  

To enable a custom content provider:

  1. Implement the custom configuration pipeline processor, as in the following example:

    public class GetCustomConfigurationName
    {
        public void Process(GetTaggingConfigurationArgs args)
        {
            //perform check
            if ()
            {
                 args.ConfigurationName "CustomConfiguration";
            }
         }
    ...
  2. In the configuration file, create a new named configuration set and include the new content provider, as in the following example:

    <contentTagging>
      <configurations>
        <config name="CustomConfiguration">
          <content>
            <provider name="CustomContentProvider"/>
          </content>
          <tagger>
            <provider name="DefaultTagger"/>
          </tagger>
          <taxonomy>
            <provider name="DefaultTaxonomyProvider"/>
          </taxonomy>
        </config>
      </configurations>
    </contentTagging> 
  3. Add the custom pipeline processor to the getTaggingConfiguration pipeline. With this processor, you can change the active configuration for the specific item type.

    <getTaggingConfiguration>
        <processor type="Sitecore.ContentTagging.Pipelines.GetTaggingConfiguration.GetDefaultConfigurationName, Sitecore.ContentTagging" resolve="true" />
        <processor type="Sitecore.ContentTagging.Pipelines.GetTaggingConfiguration.GetCustomConfigurationName, Sitecore.ContentTagging" resolve="true" />
        <processor type="Sitecore.ContentTagging.Pipelines.GetTaggingConfiguration.BuildConfiguration, Sitecore.ContentTagging" resolve="true" />
    </getTaggingConfiguration>
If you have suggestions for improving this article, let us know!