Coveo for Sitecore 5 is now available!

Managing Fields for a Specific Index

Instead of changing the setting of a field for all indexes, you can manage the setting of a field for a specific Coveo index.

Field settings defined in the defaultIndexConfiguration element are applied to all indexes. See Removing or Replacing Fields to remove a field setting previously configured in all indexes.

For example, to add a field configuration specifically for the Coveo_master_index index, you need to edit the Coveo Search Provider configuration as follows.

  1. Open the Coveo.SearchProvider.Custom.config file with a text editor.
  2. Inside the sitecore node, add the code block below. Fields must be added in a <fieldNames hint="raw:AddFieldByFieldName"> element. Replace mysitecorefield with the name of your Sitecore field.
  3. Add the isSourceSpecific setting and set the value to true. This is required to create a unique name for this field (see Understanding Sitecore, Coveo for Sitecore, and Coveo Fields - Handling Duplicate Field Names Between Indexes).
  4. Add the setting of your choice. In this example, the isFacet setting is set to true to allow facet search on this field.

    <contentSearch>
      <configuration>
        <indexes>
          <index id="Coveo_master_index">
            <configuration ref="coveo/defaultIndexConfiguration">
              <fieldMap type="Coveo.SearchProvider.CoveoFieldMap, Coveo.SearchProvider">
                <fieldNames hint="raw:AddFieldByFieldName">
                  <fieldType fieldName="mysitecorefield" isSourceSpecific="true" isFacet="true" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" />
                </fieldNames>
              </fieldMap>
            </configuration>
          </index>
        </indexes>
      </configuration>
    </contentSearch>
    

Removing or Replacing Field Settings

Coveo for Sitecore (July 2016)

Because all field settings defined in the defaultIndexConfiguration are applied to all Coveo indexes, remove and replace methods have been implemented to allow you to remove specific field settings or to replace the entire list of field settings for a specific Coveo index.

Section name Description
indexes/index[id='INDEXNAME']/configuration/fieldMap/fieldNames[hint='raw:RemoveFieldByFieldName'] This section is used to remove Sitecore fields from the default list for a specific Coveo index.
indexes/index[id='INDEXNAME']/configuration/fieldMap/fieldNames[hint='raw:ReplaceFieldByFieldName'] This section is used to completely replace the Sitecore fields from the default list for a specific Coveo index.
indexes/index[id='INDEXNAME']/configuration/fieldMap/externalFields[hint='raw:RemoveExternalField'] This section is used to remove external fields from the default list for a specific Coveo index.
indexes/index[id='INDEXNAME']/configuration/fieldMap/externalFields[hint='raw:ReplaceExternalField'] This section is used to completely replace the external fields from the default list for a specific Coveo index.
indexes/index[id='INDEXNAME']/configuration/fields[hint='raw:RemoveComputedIndexField'] This section is used to remove computed fields from the default list for a specific Coveo index.
indexes/index[id='INDEXNAME']/configuration/fields[hint='raw:ReplaceComputedIndexField'] This section is used to completely replace the computed fields from the default list for a specific Coveo index.
Recommended Articles