Reset a field setting

Coveo for Sitecore lets you set Sitecore field attributes in your Sitecore instance configuration. You propagate those settings to the corresponding Coveo fields with an indexing action or an API synchronization call. In some cases, this synchronization may not change the Coveo field settings as expected. Coveo for Sitecore has a field setting conflict handling mechanism that may prevent the changes from being applied.

This article explains what the conflict handling mechanism does and how to work around it to reset a field setting.

Conflict handling mechanism

A setting (for example, isFacet) for a given field can be defined in each of your Sitecore instance field configurations and in the Coveo Administration Console. Coveo for Sitecore must handle situations where the settings in these locations conflict with each other. Coveo for Sitecore assumes that if you set up a Sitecore instance configuration to override the default value of a field attribute, you are doing so intentionally.

The following table summarizes how the conflict handling mechanism handles an attempt to reset the field setting to its default value.

Attribute Conflict handling behavior

isDisplayField

Default value is true, so if set to false anywhere, the Coveo field setting will stay false.

includeForFreeTextSearch

Default value is false, so if set to true anywhere, the Coveo field setting will stay true.

isFacet

Default value is false, so if set to true anywhere, the Coveo field setting will stay true.

isMultiValue

Default value is false, so if set to true anywhere, the Coveo field setting will stay true.

isSortable

Default value is false, so if set to true anywhere, the Coveo field setting will stay true.

useForRanking

Default value is false, so if set to true anywhere, the Coveo field setting will stay true.

useStemming

Default value is false, so if set to true anywhere, the Coveo field setting will stay true.

Example

Two Sitecore instances linked to the same Coveo organization are using the same test field. One instance has the test field’s isFacet attribute set to true. Regardless of the test field’s isFacet attribute value on the second Sitecore instance, the test Coveo field (that is, the Coveo Platform field) will be marked as a Facet. Even if you set the test field’s isFacet attribute back to false on both Sitecore instances, because the Coveo test field’s Facet option is set to true, it will remain true after a synchronization operation.

Reset a field setting

To reset any of the listed field settings, change the configuration file in all Sitecore instances and update the field in the Coveo Administration Console.

  1. Open the <SITECORE_INSTANCE_ROOT>\App_Config\Include\Coveo\Coveo.SearchProvider.Custom.config file with a text editor.

  2. Under the fieldMap > fieldNames node, locate the fieldType element associated with the field you want to modify.

    Note

    If you’re unable to find this element, you might need to copy another fieldType element in the file or from the <SITECORE_INSTANCE_ROOT>\App_Config\Modules\Coveo\Coveo.SearchProvider.config file and modify it for your needs. Don’t modify the Coveo.SearchProvider.config file directly, as it may cause issues during upgrades.

  3. Change the field attribute value. For example, to make the field non-facettable, change isFacet="true" to isFacet="false".

  4. Repeat the previous steps in all Sitecore content indexing instances.

  5. In the Coveo Administration Console, access the Fields (platform-ca | platform-eu | platform-au) page.

  6. Double-click the field you want to modify.

  7. Change the Coveo field setting. For example, to make the field non-facettable, clear the Facet checkbox.

  8. Click Save.