--- title: About the Coveo Search Provider configuration file slug: '2562' canonical_url: https://docs.coveo.com/en/2562/ collection: coveo-for-sitecore-v5 source_format: adoc --- # About the Coveo Search Provider configuration file The Coveo Search Provider settings are located in the `\App_Config\Modules\Coveo\Coveo.SearchProvider.config` file. This page describes its various sections and settings. > **Important** > > To avoid modifying the original file, you should configure the Coveo Search Provider by modifying the `\App_Config\Include\Coveo\Coveo.SearchProvider.Custom.config` file. ## General settings These are various broad Coveo settings found under the `configuration/sitecore/settings` element. [%header,cols="2,3,2"] |=== |Name |Description |Example value |`Coveo.Indexing.CommittedDocumentsPollingEnabled` |Specifies whether Coveo for Sitecore should poll the Coveo index during a rebuild to verify that added or updated Sitecore items are searchable. The default value is `true`. For more information, see the [Rebuilds failing at the document validation phase](https://docs.coveo.com/en/pa8a0219/) known issue. |`true` / `false` |`Coveo.Indexing.DeletedDocumentsPollingEnabled` |Specifies whether Coveo for Sitecore should poll the Coveo index during a rebuild to verify that deleted Sitecore items have been removed. The default value is `true`. See the [Rebuilds failing at the document validation phase](https://docs.coveo.com/en/pa8a0219/) known issue for more information. |`true` / `false` |`Coveo.Indexing.DeleteOldDocumentsDelay` |Time between the completion of [calls to the Coveo Push API](https://docs.coveo.com/en/2535#validating-routes-1-6-from-sitecore-to-coveo) for the new and updated Sitecore items and the start of removing deleted Sitecore items. The default value is `00:00:00` (no wait). See the [Rebuilds failing at the document validation phase](https://docs.coveo.com/en/pa8a0219/) known issue for more information. |`00:05:00` |`Coveo.Indexing. PreferSourceSpecificFields` |Specifies the default field name translation behavior for the current Sitecore instance. {nbsp} {nbsp} This setting may be overridden at the field level using the `isSourceSpecific` setting (see [fieldNames](#fieldnames)). |`true` (field translation will be used) `false` (field translation won't be used) a|{empty} -- [.version.c4sc.c4sc-new.5-0-1227-1.May-9&-2023] [Coveo for Sitecore 5.0.1227.1](https://docs.coveo.com/en/n3ne0564#release-notes) -- `Coveo.Framework. WriteToPropertyStoreDisabled` a|This setting is set to true on CD servers to prevent writing to the Property Store. Don't update this setting. |`true` / `false` a|{empty} -- [.version.c4sc.c4sc-new.5-0-1227-1.May-9&-2023] [Coveo for Sitecore 5.0.1227.1](https://docs.coveo.com/en/n3ne0564#release-notes) -- `Coveo.Framework. CriticalExceptionsDisabled`[[useserverurlfromconfiguration]] |Prevents CDs from trying to write `LASTCRITICALINDEXINGEXCEPTION` records in the Property Store. {nbsp} {nbsp} This setting should only be set to `true` on CD servers in setups where the Property Store database is in read-only mode (see [Preventing CDs from trying to write to the Property Store database](https://docs.coveo.com/en/2264#step-4-preventing-cds-from-trying-to-write-to-the-property-store-database)). |`true` / `false` |`Coveo.Url.UseServerUrlFromConfiguration` a|Whether to use the [`serverUrl`](#serverurl) setting in the clickable URI of items at indexing time. {nbsp} {nbsp} May also be used to force the use of [`serverUrl`](#serverurl) in the clickable URI of media items at query time. {nbsp} {nbsp} Default value is `false`. | `true` / `false` |=== ## Basic configuration settings These are basic settings that may be configured initially. They can be found under the `configuration/sitecore/coveo/defaultIndexConfiguration` element. [%header,cols="1,5,3"] |=== |Name |Description |Example value |`allowQueriesFromQuickView` |Whether to allow search queries to be sent in the context of a Coveo Quick view. The element is under the `queryConfiguration` section. Setting the value to `false` blocks the search query, but only when Coveo for Sitecore is visiting the item to fill the Quick view. The search query is still performed for any other visitor. The default value is `false`. |`true` / `false` a|{empty} -- [.version.c4sc.c4sc-new.5-0-1227-1.May-9&-2023] [Coveo for Sitecore 5.0.1227.1](https://docs.coveo.com/en/n3ne0564#release-notes) -- `disableSourceCreation` |Whether to disable the creation of the sources on rebuild, as well as the indexing of the Sitecore instance content. |`true` / `false` |`enableSitecoreBoosting` |Whether Sitecore boosting is supported in queries or not. |`true` / `false` |`farmName` a|The name of the Sitecore farm. Specifying a value in this setting will affect the names of the sources, security provider, and user identity. For example, setting the farm name to `dev` would generate the following resource names: * Source: `Coveo_master_index - dev` * Security provider: `Expanded Sitecore Security Provider for dev` When this setting isn't specified, the farm name corresponds to the instance name which is, by default, composed of the machine name and the IIS website name (for example, `MyMachine - SiteName`). |`dev`, `staging`, `production` |`forceDeleteExcludedItems` |Whether to force a delete on excluded items. By design, Coveo for Sitecore doesn't make calls to delete items excluded by a filter. To force the deletion of excluded items, enable this option. Disable it once you're done to avoid allocating resources to this process when it's unnecessary. |`true` / `false` a|{empty} -- [.version.no-link.c4sc.c4sc-new.5-0-1227-1.May-9&-2023] Coveo for Sitecore 5.0.1227.1 -- `indexAllFields` |Coveo for Sitecore 5 doesn't take the `indexAllFields` setting into account. Handpick the fields you want to index through the [Fields section of the Command Center](https://docs.coveo.com/en/2566#fields). | |`indexAnalyticsFields` |Whether to index fields needed for Analytics, such as the `_tracking` field. |`true` / `false` |`indexCommunicationFactory` |The factory used to instantiate objects required to communicate with the index. | |`indexCoveoFields` |Whether to index Coveo fields on documents. These fields are system fields that aren't starting with an underscore (_), such as `templatename`. |`true` / `false` |`indexReferrerItemsOnUpdate` |Whether referrer items are re-indexed on an item update. |`true` / `false` |`maximumAge` |Defines the delay that query results are cached before being refreshed by a new query on the index. This element is under the `queryConfiguration` section. |`00:15:00` |`multipleValueSeparator` |The separator used for fields that contain many values. For example, a field could contain a series of GUIDs. This must match what's set in Coveo. |`;` |`pushPermissionsOnRebuild` |Whether to send the Sitecore users and roles to Coveo on each index rebuild. |`true` / `false` |`requirementsInvalidateDelay` a|The delay, in seconds, before the index requirements are invalidated. The index requirements include the sources, security provider, and user identity. Useful when there are frequent indexing operations that are batched by the Sitecore search provider. In other words, the index configuration is verified each time an item is indexed. This behavior might occur in these situations: * When managing items through programming (for example, add/update/remove) * When using the Sitecore workbox to update many items at once * When managing buckets Setting a value lower than `10` might cause performance issues. The minimum value is `1`. |`60` |`securityProviderName` |The name of the security provider in Coveo. Used when many Sitecore instances are targeting the same Coveo organization. This setting supersedes the value set in the `farmName` setting. |`Sitecore Security Provider`[[serverurl]] |`serverUrl` a|This setting serves multiple purposes: * As a fallback host name when [resolving URIs of documents at indexing time](https://docs.coveo.com/en/2930#how-the-site-is-resolved-at-indexing-time) (when [`UseServerUrlFromConfiguration`](#useserverurlfromconfiguration) is set to `false`). * As the host name in the clickable URI of documents at indexing time (when [`UseServerUrlFromConfiguration`](#useserverurlfromconfiguration) is set to `true`). * As the host name in the [clickable URI of media items at query time](https://docs.coveo.com/en/2930#automatic-recomputation-of-the-clickable-uri-at-query-time) (when [`UseServerUrlFromConfiguration`](#useserverurlfromconfiguration) is set to `true`). |`+http://app-prod.example.com/+` |`shortenUrls` |Whether the clickable URI should be shortened. This will be taken into account in the `UrlOptions` when resolving URIs of documents. |`true` / `false` |`sitecorePassword` |The Sitecore password. Used for the Coveo security provider. This password is set when using the Configuration Wizard and it's stored in its encrypted form in the configuration file. | |`sitecoreUsername` |The Sitecore username. Used for the Coveo security provider. |`sitecore\admin` |`sitecoreWebServiceUri` |The URI of the Sitecore Web Service. Used to retrieve the binary data of Sitecore items. |`+http:///sitecore%20modules/Web/Coveo/WebService/SitecoreWebService.asmx+` |`siteName` |The site name to extract Sitecore content from. |`website` a|{empty} -- [.version.c4sc.c4sc-new.5-0-1227-1.May-9&-2023] [Coveo for Sitecore 5.0.1227.1](https://docs.coveo.com/en/n3ne0564#release-notes) -- `SkipItemOnComputedFieldError` |When indexing, whether to skip an item when an exception occurs during the execution of computed field code. Default is `false` which results in the item being indexed, but without the computed field that the exception occurred on. When set to `true`, the item isn't indexed at all. |`true` / `false` |`userIdentityName` |The name of the user identity in Coveo. Used when many Sitecore instances are targeting the same Coveo organization. This setting supersedes the value set in the `farmName` setting. |`Sitecore Admin for MyMachine - SiteName` |=== ## Index-related configuration settings Those are the settings that are specific to the Coveo index. They can be found under the `configuration/sitecore/contentSearch/configuration/indexes` element. [%header,cols="3"] |=== |Name |Description |Example value |param desc="p_Name" |The name (id) of the index. | |BinaryDataPropertiesWriter |The instance of `IBinaryDataPropertiesWriter` used to write binary data properties on documents sent to Coveo. | |locations > crawler > database |The database name associated with the crawler. |`master` |locations > crawler > root |The starting point of this crawler when indexing. |`/sitecore` |strategies |List all indexing strategies to apply to this index. | |strategies > strategy > type |The Sitecore strategy to use. You must add the required parameter as child element so the strategy can run correctly. The parameter is `database`. | |sourceName a|The source name to be used in Coveo. This should only be set if you explicitly want to override the default source name created by Coveo for Sitecore. > **Important** > > You shouldn't use the same source name for different Sitecore instances, given that they're all linked to the same Coveo organization. > Be aware that doing so may cause major indexing and querying issues. | |=== ```xml $(id) web /sitecore/content true web /sitecore/media library/Files true ``` ## Security-related configuration settings These are settings that are specific to the security configuration of the Search Provider. They can be added under the `configuration/sitecore/coveo/defaultIndexConfiguration` element. ```xml extranet\anonymous true false false ``` [%header,cols="3"] |=== |Name |Description |Default value |`anonymousUsers` |A semicolon-separated list of usernames that are considered as anonymous Sitecore users. |`extranet\anonymous` |`indexPermissions` |Whether to index the Sitecore permissions on items. Disabling this indexes all the items as Anonymous. |`true` |`skipSitecoreCredentialsUpdate` |Skips the Sitecore credentials update in Coveo for the Security Provider. To be used on content delivery servers to simplify the setup. |`false` |`skipSitecoreLoginCheck` |Skips the login validation in Sitecore. To be used only on content delivery servers to simplify the setup. |`false` |=== ## Field configuration settings ### ComputedFields Computed fields are fields that are created from a combination of other fields. A typical computed fields section looks like this: ```xml Sitecore.ContentSearch.ComputedFields.DateRangeMonthFacet,Sitecore.ContentSearch Sitecore.ContentSearch.ComputedFields.DateRangeWeekFacet,Sitecore.ContentSearch Sitecore.ContentSearch.ComputedFields.DateRangYearFacet,Sitecore.ContentSearch Sitecore.ContentSearch.ComputedFields.ParsedCreatedBy,Sitecore.ContentSearch Sitecore.ContentSearch.ComputedFields.ParsedLanguage,Sitecore.ContentSearch ``` ### FieldMap The field map defines how a field is mapped between Sitecore and the [Coveo Platform](https://docs.coveo.com/en/186/). Here is a sample configuration: ```xml ``` To use a Sitecore field in a UI facet component or make it sortable, you must define it in the `fieldNames` node. The most common options you can define on the `fieldType` element are explained in the following table. > **Note** > > Most changes to this section will be taken into account in the [Coveo Platform](https://docs.coveo.com/en/186/) only after the affected items are re-indexed (see [Coveo for Sitecore indexing guide](https://docs.coveo.com/en/2216/)). > The last column of the table indicates whether re-indexing is required. > > In some cases, an indexing action or API synchronization call 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. > See [Reset a field setting](https://docs.coveo.com/en/2316/) for more details and how to work around this. The `externalFields` section defines how non-Sitecore fields are handled by Coveo for Sitecore. For example, to avoid [field translation](https://docs.coveo.com/en/2551#handling-duplicate-field-names-between-indexes) of the `collection` Coveo system field when used in a UI facet component, it must be defined in the `externalFields` node (see [Make a Sitecore field facetable](https://docs.coveo.com/en/2375/)). The same configuration must be used for external source fields that don't exist in Sitecore templates or computed index fields. #### fieldNames The following table explains the most common options that can be defined on the `fieldType` element. [%header,cols="6"] |=== |Parameter name |Description |Example value |Default value |Limitations |Requires re-indexing |`fieldName` |Defines the name of the Sitecore template field or Sitecore computed index field to configure options for. |`_uniqueId` | | |Yes |`includeForFreeTextSearch` |Defines whether full-text search operations can be performed on this field. |`true` / `false` |`false` |Can be modified only on string fields. |Yes |`isFacet` |Defines whether facets can be bound to this field. This is also required for wildcard search. |`true` / `false` |String fields: `false` Date, numeric, and long fields: `true` a|* Can be modified only on string fields. * The `isFacet` and `isMultiValue` settings on a field are mutually exclusive. |Yes |`isMultiValue` |Defines whether this field contains many values. This is required for the "OR" and "AND" filtering in the facets. |`true` / `false` |`false` a|* Can be modified only on string fields. * The `isFacet` and `isMultiValue` settings on a field are mutually exclusive. |Yes |`isSortable` |Defines whether search results can be sorted by this field. |`true` / `false` |String fields: `false` Date, numeric, and long fields: `true` |Can be modified only on string fields. |Yes |`isSourceSpecific` |Defines whether the translation (addition of the "f" prefix and the source name hash suffix) should be used on this field. |`true`: field translation will be used `false`: field translation won't be used |Same as `PreferSourceSpecificFields` setting value, which is set to `false` by default. See [Upgrading from August 2018 (4.1.518.18) to September (4.1.590.21)](https://docs.coveo.com/en/1492/?c4scDeployment=C4SCToggleSectionCloud#step-2-manually-update-the-configuration-files) for more information. | |Yes |`isDisplayField` |Defines whether the field should be returned in search results. |`true` / `false` |`true` | |Yes |`useForRanking` |Defines whether values used in a filter on this field are used for search results ranking calculation and highlighting. |`true` / `false` |`false` |Can be modified only on string fields. |No |`useStemming` |Defines whether to stem the query in a filter specific on this field. |`true` / `false` |`false` |Can be modified only on string fields. |No |`useCacheForComputedFacet` |Defines whether to load data in memory for index computed fields. |`true` / `false` |`false` |Can be modified only on date, numeric, and long fields. |No |`useCacheForNestedQuery` |Defines whether to load data required to perform nested queries in memory. |`true` / `false` |`false` |Can be modified only on date, numeric, and long fields. |No |`useCacheForNumericQuery` |Defines whether to load data of numeric queries in memory, which allows quicker numeric operations, including operations on dates. |`true` / `false` |`false` |Can be modified only on date, numeric, and long fields. |No |`useCacheForSort` |Defines whether to load the sort data in memory. |`true` / `false` |`false` |Can be modified only on date, numeric, and long fields. |No |`returnType` |Defines the type of field as seen by the index. For example, you want an `id` to be indexed as a `string`, so you would specify `System.String`. It needs to be used with a `typeConverter`. |`System.String` if you want a string, `System.Int32` for an integer field, `System.DateTime` for a Date field, etc. |`System.String` | |Yes |`settingType` |Defines the type of class to be used for the configuration of this field. This shouldn't be changed. |`Coveo.Framework.Configuration. FieldConfiguration, Coveo.Framework` |`Coveo.Framework.Configuration. FieldConfiguration, Coveo.Framework` | |N/A |`typeConverter` |Defines the converter to be used for this specific field. It must work with the `type` and the `returnType`; the converter should take a field of the `type` as input and then outputs the converted value of `returnType`. |`Sitecore.ContentSearch.Converters. IndexFieldGuidValueConverter, Sitecore.ContentSearch` |`null` | |Yes |=== #### externalFields The following table explains the most common options that can be defined on the `field` element. [%header,cols="6"] |=== |Parameter name |Description |Example value |Default value |Limitations |Requires re-indexing |`fieldName` |Defines the name of the non-Sitecore field to make available in Sitecore. |`size` | | |No |`fieldTypeName` |Defines the type of the field seen by the Coveo components (Facet, Facet Range, Slider...). |`Number` / `Integer` / `date` / `datetime` / `string` |`string` | |No |=== ### FieldReaders The FieldReaders node defines which .NET class should handle a specific Sitecore field type. You can easily customize how a field is read by specifying its type name. In the `Sitecore.ContentSearch` assembly, Sitecore already provides a few field readers for various types, such as Checkbox, Date, RichText, Image, Lookup, etc. You can also create your own field readers in .NET by inheriting the `Sitecore.ContentSearch.FieldReaders.FieldReader` class and overriding the `GetFieldValue` and `GetIndexFieldName` methods. For more details on how to achieve this, you can visit [Sitecore's technical blog](https://community.sitecore.com/community/en/sitecore-7-search-provider-part-6-controlling-which-values-get-indexed?id=community_blog&sys_id=66b26b6d1b8370d0b8954371b24bcb51) or [Sitecore's official documentation portal](https://archive.doc.sitecore.com/xp/en/sdnarchive/). ```xml ``` ### IndexFieldStorageValueFormatter The index field storage value formatter is used to convert some field into a format recognized by the Coveo index. Here is an example: ```xml ``` The common options of the conversion types are explained in the following table. [%header,cols="3"] |=== |Parameter name |Description |Example |`inputType` |Defines the type to which the conversion will be applied. It means that all fields with this type will be converted with the specified converter. |`Sitecore.Data.ItemUri` |`type` |Defines the type of converter to be used for this conversion type. |`Sitecore.ContentSearch.Converters. IndexFieldItemUriValueConvertor, Sitecore.ContentSearch` |=== > **Notes** > > In the conversion process for fields, the `CoveoFieldMap` is used first if you specified a `returnType` and a `typeConverter` for a specific field. > If it fails or if you have not specified anything, it will try to find the good converter in the `IindexFieldStorageValueFormatter` element. > If the type of the field isn't defined there, it will simply index the raw value of the field. ### VirtualFieldProcessors Some fields can be created outside of the Sitecore context and have a meaning only in the search context. Those aren't real fields on Sitecore items, but fields created on-the-fly by the corresponding processor. ```xml ``` ## Miscellaneous configuration settings Those are miscellaneous settings that are used to configure various modules of the Sitecore Search Provider. They can be found under the `configuration/sitecore/coveo/defaultIndexConfiguration` element. ### CloudPlatformCommunicationFactory The Coveo Platform Communication Factory is the factory responsible for enabling communication between Coveo and Sitecore. A typical configuration of this node looks like this: ```xml ``` ### Using logging for debugging purposes The Sitecore Search Provider uses the log4net logging library bundled with Sitecore. To enable logging, add the following node into the `Coveo.SearchProvider.Custom.config` file of your Sitecore instance. To enable logging in whatever part of the code, modify the logger's name. > **Note** > > The method below enables logging for the namespace `Coveo`. > Therefore, any other class which uses log4net and which isn't located in that namespace won't log anything using that logger. ```xml ```