Understanding the Coveo Search Provider Configuration File
Understanding the Coveo Search Provider Configuration File
The Coveo Search Provider settings are located in the Coveo.SearchProvider.config
file, which is located under App_Config\Include\Coveo
. This page describes its various sections and settings.
To avoid modifying the original file, you should configure the Coveo Search Provider by modifying the Coveo.SearchProvider.Custom.config
file, which is located in the same folder.
Basic Configuration Settings
Those are the basic settings that may be configured initially. They can be found under the configuration/sitecore/coveo/defaultIndexConfiguration
element.
Name | Description | Example value |
---|---|---|
On-Premises only
|
The Admin Service URI. | http://localhost/AdminService |
Coveo for Sitecore (December 2016)
|
Whether to allow search queries to be sent in the context of a Coveo Quick view. The element is under the Setting the value to The default value is |
true /false
|
On-Premises only
|
The name of the collection in CES. | Sitecore Search Provider |
Coveo for Sitecore (March 2017) Coveo for Sitecore (Nov. 2018)
|
Allows the specification of settings to apply on facets when performing a LINQ query (
|
|
Coveo for Sitecore (March 2017) Coveo for Sitecore (Nov. 2018)
|
The default injection depth value to apply on facets when performing a LINQ query (FacetOn function). The element is under queryConfiguration . |
1000 |
Coveo for Sitecore (Nov. 2018)
|
The default number of facet values that are returned when performing a LINQ query (FacetOn function). The element is under queryConfiguration . |
16 |
Coveo for Sitecore (Nov. 2018)
|
The default number of results that are returned when performing a LINQ query. The element is under queryConfiguration . |
10 |
enableSitecoreBoosting |
Whether Sitecore boosting is supported in queries or not. | true/false |
On-Premises only
|
Whether to encrypt data sent to the indexing queue. | true/false |
farmName |
The name of the Sitecore farm. Specifying a value in this setting will affect the names of the sources, fieldsets (for On-Premises), security provider, and user identity (for On-Premises). For example, setting the farm name to
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
|
fieldsBatchSize |
The number of fields to send in a single batch to the Admin Service. | 250 |
|
Whether to force a delete on excluded items.
By design, Coveo for Sitecore doesn't make calls to delete items excluded by a filter subsequently to their indexing. You can enable this option if you want to force the deletion of these items.
Don't forget to disable it once you're done to avoid allocating resources to this process when it's unnecessary.
|
true/false |
indexAllFields |
Whether to index all Sitecore fields. If set to false , every needed field must be specified in the config file. |
true/false |
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 |
Cloud only
|
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 on the side of the Coveo Platform.
|
; |
On-Premises only
|
The Admin Service password.
When you set this password using the Configuration Wizard, it's stored in its encrypted form in the configuration file. You can also set it manually by editing the configuration file and entering the password as clear text. Be aware that, once you do that, it will stay unencrypted.
|
|
Cloud only Coveo for Sitecore (Oct. 2016)
|
Whether to send the Sitecore users and roles to Coveo Cloud on each index rebuild. | true/false |
On-Premises only
|
The RabbitMQ password.
This password is set when using the Configuration Wizard and it's stored in its encrypted form in the configuration file.
|
|
On-Premises only
|
The RabbitMQ URI.
The URI may contain credentials (for example,
amqp://username:password@localhost:5682/ ). When it contains credentials, the QueueUsername and QueuePassword settings aren't used.
|
amqp://localhost:5682/ |
On-Premises only
|
The RabbitMQ username. | guest |
On-Premises only
|
The message size threshold beyond which binary data is compressed in RabbitMQ queues. Useful when indexing large files in the media library. | 10 (MB) |
requirementsInvalidateDelay |
The delay, in seconds, before the index requirements are invalidated. Setting the value to zero means that the index requirements is checked before any indexing operation. 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:
Setting a value lower than
10 might cause performance issues.
Coveo for Sitecore
The minimum value is
1 .
|
60 |
securityProviderName |
The name of the security provider in the Coveo Platform. Used when many Sitecore instances are targeting the same Coveo Platform. This setting supersedes the value set in the |
Sitecore Security Provider |
serverUrl |
The Sitecore server URL. Used by the Coveo security provider. | http://jetstreamsitecore7/ |
shortenUrls |
Whether the clickable URI should be shortened. This will be taken into account in the |
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://sitecoreInstance/sitecore%20modules/Web/Coveo/WebService/SitecoreWebService.asmx |
siteName |
The site name to extract Sitecore content from. | website |
skipFirstTimeSetupCheck |
Whether to skip the First time setup check on Coveo Enterprise Search when initializing. Can be used on Content Delivery only servers. | true/false |
userIdentityName |
The name of the user identity in the Coveo Platform. Used when many Sitecore instances are targeting the same Coveo Platform. This setting supersedes the value set in the |
Sitecore Admin for MyMachine - SiteName |
On-Premises only
|
The Admin Service username. |
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.
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 the Coveo Platform . | |
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 need to add the required parameter as child element so the strategy can run correctly. The parameter is |
|
sourceName |
The source name to be used in the Coveo Platform . This should only be set if you explicitly want to override the default source name created by Coveo for Sitecore.
You shouldn't use the same source name for different Sitecore instances, given that they're all linked to the same Coveo Platform. Be aware that doing so may cause major indexing and querying issues.
|
<index id="Coveo_web_index" type="Coveo.SearchProvider.ProviderIndex, Coveo.SearchProvider" patch:before = "*[2]">
<param desc="p_Name">$(id)</param>
<configuration ref="coveo/defaultIndexConfiguration" />
<locations hint="list:AddCrawler">
<crawler type="Coveo.SearchProvider.CoveoItemCrawler, Coveo.SearchProviderBase">
<database>web</database>
<root>/sitecore/content</root>
<stopOnError>true</stopOnError>
</crawler>
<crawler type="Coveo.SearchProvider.CoveoItemCrawler, Coveo.SearchProviderBase">
<database>web</database>
<root>/sitecore/media library/Files</root>
<stopOnError>true</stopOnError>
</crawler>
</locations>
<strategies hint="list:AddStrategy">
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/onPublishEndAsync"/>
</strategies>
<propertyStore ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)"/>
</index>
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.
<securityConfiguration type="Coveo.Framework.Configuration.SecurityConfiguration, Coveo.Framework">
<anonymousUsers>extranet\anonymous</anonymousUsers>
<indexPermissions>true</indexPermissions>
<skipSitecoreCredentialsUpdate>false</skipSitecoreCredentialsUpdate>
<skipSitecoreLoginCheck>false</skipSitecoreLoginCheck>
</securityConfiguration>
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 on Content Delivery only 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:
<fields hint="raw:AddComputedIndexField">
<field fieldName="daterange_month">Sitecore.ContentSearch.ComputedFields.DateRangeMonthFacet,Sitecore.ContentSearch</field>
<field fieldName="daterange_week">Sitecore.ContentSearch.ComputedFields.DateRangeWeekFacet,Sitecore.ContentSearch</field>
<field fieldName="daterange_year">Sitecore.ContentSearch.ComputedFields.DateRangYearFacet,Sitecore.ContentSearch</field>
<field fieldName="parsedcreatedby">Sitecore.ContentSearch.ComputedFields.ParsedCreatedBy,Sitecore.ContentSearch</field>
<field fieldName="parsedlanguage">Sitecore.ContentSearch.ComputedFields.ParsedLanguage,Sitecore.ContentSearch</field>
</fields>
FieldMap
The field map defines how a field is mapped between Coveo and Sitecore. Here is an example:
<fieldMap type="Coveo.Framework.Fields.CoveoFieldMap, Coveo.Framework">
<param desc="coveoReflectionFactory" type="Coveo.Framework.Utils.CoveoReflectionFactory, Coveo.Framework" />
<fieldNames hint="raw:AddFieldByFieldName">
<fieldType fieldName='_id' settingType='Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework' type='Sitecore.Data.ID, Sitecore.Kernel' returnType='System.String'/>
<fieldType fieldName='_uniqueid' settingType='Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework' type='Sitecore.Data.ItemUri, Sitecore.Kernel' returnType='System.String'/>
</fieldNames>
<externalFields hint="raw:AddExternalField">
<field fieldName="sysauthor"/>
<field fieldName="syscollection"/>
<field fieldName="syssize" fieldTypeName="Number"/>
</externalFields>
</fieldMap>
Starting from Sitecore 7.5, the namespace changed for <fieldMap type="Coveo.SearchProvider.CoveoFieldMap, Coveo.SearchProvider">
.
The fieldNames
section defines how Sitecore template fields and Sitecore computed index fields are mapped between Coveo and Sitecore. For example, to use a Sitecore field in a facet UI component or to make it sortable, it must be defined in the fieldMap/fieldNames
node. Some of the most common options that can be defined on the fieldType
element are explained in the following table.
Most changes to this section will be taken into account in the Coveo Platform only after the configuration will be synchronized (see Synchronize Coveo for Sitecore Configuration) and the affected items are re-indexed (see Coveo for Sitecore Indexing Guide). The last column of the table indicates whether re-indexing is required.
On the other hand, the externalFields
section defines how non-Sitecore fields are handled by Coveo for Sitecore. For example, to avoid field translation (addition of the “f” prefix and the source name hash suffix) of the syscollection Coveo system field when used in a facet UI component (see Making a Sitecore Field Facetable), it must be defined in the fieldMap/externalFields
node. The same configuration must be used for external source fields that don’t exist in Sitecore templates or computed index fields.
fieldNames
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:
Date, numeric, and long fields:
|
Can be modified only on string fields. | Yes |
isMultiValue
|
Defines whether this field contains many values. This is required for the "OR" and "AND" filtering in the facets. |
true / false
|
false
|
Can be modified only on string fields. | Yes |
isSortable
|
Defines whether search results can be sorted by this field. |
true / false
|
String fields: Date, numeric, and long fields: |
Can be modified only on string fields. | Yes |
Coveo for Sitecore (September 2018)
isSourceSpecific instead.)
|
Defines whether the translation (addition of the "f" prefix and the source name hash suffix) should be used on this field. |
true / false N.B.: true : field translation won't be usedfalse : field translation will be used
|
false
|
Yes | |
Coveo for Sitecore (September 2018) isSourceSpecific
|
Defines whether the translation (addition of the "f" prefix and the source name hash suffix) should be used on this field. |
true / false N.B.: true : field translation will be usedfalse : field translation won't be used
|
Same as See Upgrading from August 2018 to September 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
|
|
Can be modified only on string fields. | No |
Cloud only
|
Defines whether to stem the query in a filter specific on this field. |
true / false
|
false
|
Can be modified only on string fields. | No |
Cloud only
|
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 |
Cloud only
|
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 |
Cloud only
|
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 |
Cloud only
|
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, in the case of an id , you would want it 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.Date 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 | |
type
|
Defines the input type of the field. For example, for an id field, the input type would be the type corresponding to an ID in Sitecore. This information isn't used by the Coveo Search Provider. Modifying it won't override the Sitecore value for this field. |
Sitecore.Data.ID, Sitecore.Kernel
|
System.String
|
Yes | |
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
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. |
syssize
|
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.
<fieldReaders type="Sitecore.ContentSearch.FieldReaders.FieldReaderMap, Sitecore.ContentSearch">
<mapFieldByTypeName hint="raw:AddFieldReaderByFieldTypeName">
<fieldReader fieldTypeName="checkbox" fieldReaderType="Sitecore.ContentSearch.FieldReaders.CheckboxFieldReader, Sitecore.ContentSearch" />
<fieldReader fieldTypeName="datetime" fieldReaderType="Sitecore.ContentSearch.FieldReaders.DateFieldReader, Sitecore.ContentSearch" />
<fieldReader fieldTypeName="date" fieldReaderType="Sitecore.ContentSearch.FieldReaders.DateFieldReader, Sitecore.ContentSearch" />
</mapFieldByTypeName>
</fieldReaders>
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:
<indexFieldStorageValueFormatter type="Coveo.Framework.Conversion.CoveoIndexFieldStorageValueFormatter, Coveo.Framework" >
<param desc="coveoReflectionFactory" type="Coveo.Framework.Utils.CoveoReflectionFactory, Coveo.Framework" />
<conversionTypes hint="raw:AddConverter">
<conversionType inputType="System.Guid" type="Sitecore.ContentSearch.Converters.IndexFieldGuidValueConverter, Sitecore.ContentSearch" />
<conversionType inputType="Sitecore.Data.ID" type="Sitecore.ContentSearch.Converters.IndexFieldIDValueConverter, Sitecore.ContentSearch" />
<conversionType inputType="Sitecore.ContentSearch.SitecoreItemId" type="Sitecore.ContentSearch.Converters.IndexFieldSitecoreItemIDValueConvertor, Sitecore.ContentSearch" >
<param type="Sitecore.ContentSearch.Converters.IndexFieldIDValueConverter, Sitecore.ContentSearch" />
</conversionType>
<conversionType inputType="Sitecore.ContentSearch.SitecoreItemUniqueId" type="Sitecore.ContentSearch.Converters.IndexFieldSitecoreItemUniqueIDValueConvertor, Sitecore.ContentSearch" >
<param type="Sitecore.ContentSearch.Converters.IndexFieldItemUriValueConvertor, Sitecore.ContentSearch" />
</conversionType>
<conversionType inputType="Sitecore.Data.ItemUri" type="Sitecore.ContentSearch.Converters.IndexFieldItemUriValueConvertor, Sitecore.ContentSearch" />
<conversionType inputType="Sitecore.Data.ShortID" type="Sitecore.ContentSearch.Converters.IndexFieldShortIDValueConverter, Sitecore.ContentSearch" />
<conversionType inputType="System.DateTimeOffset" type="Coveo.Framework.Conversion.DateTimeOffsetValueConverter, Coveo.Framework" />
<conversionType inputType="System.TimeSpan" type="Coveo.Framework.Conversion.TimeSpanValueConverter, Coveo.Framework" />
<conversionType inputType="System.DateTime" type="Coveo.Framework.Conversion.DateTimeValueConverter, Coveo.Framework" />
</conversionTypes>
</indexFieldStorageValueFormatter>
The common options of the conversion types are explained in the following table.
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 |
- In the conversion process for fields, the
CoveoFieldMap
is used first if you specified areturnType
and atypeConverter
for a specific field. If it fails or if you have not specified anything, it will try to find the good converter in theIindexFieldStorageValueFormatter
element. If the type of the field isn’t defined there, it will simply index the raw value of the field. - Note that, starting from Sitecore 7.5, the namespace changed for
<indexFieldStorageValueFormatter type="Coveo.SearchProvider.CoveoIndexFieldStorageValueFormatter, Coveo.SearchProvider" >
.
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.
<virtualFields type="Sitecore.ContentSearch.VirtualFieldProcessorMap, Sitecore.ContentSearch">
<processors hint="raw:AddFromConfiguration">
<virtualFieldProcessor fieldName="daterange" type="Sitecore.ContentSearch.VirtualFields.DateRangeFieldProcessor, Sitecore.ContentSearch" />
<virtualFieldProcessor fieldName="_lastestversion" type="Sitecore.ContentSearch.VirtualFields.LatestVersionFieldProcessor, Sitecore.ContentSearch" />
<virtualFieldProcessor fieldName="_url" type="Sitecore.ContentSearch.VirtualFields.UniqueIdFieldProcessor, Sitecore.ContentSearch" />
<virtualFieldProcessor fieldName="_content" type="Coveo.SearchProvider.Processors.ContentFieldProcessor, Coveo.SearchProviderBase" />
</processors>
</virtualFields>
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.
CesMasterInformation
On-Premises only
The CES master information defines the different settings used to connect to CES. Here is an example:
<cesMasterInformation type="Coveo.Framework.Configuration.CesMasterInformation, Coveo.Framework">
<Id>default</Id>
<acceptedConnections hint="list:AddAcceptedConnection">
<cesAcceptedConnection type="Coveo.Framework.Configuration.CesAcceptedConnection, Coveo.Framework">
<connectionComponent>ADMIN</connectionComponent>
<connectionPort>52800</connectionPort>
<connectionType>CMF</connectionType>
</cesAcceptedConnection>
</acceptedConnections>
</cesMasterInformation>
CesCommunicationFactory
On-Premises only
The CES Communication factory is the factory responsible for enabling communication between CES 7 and Sitecore. A typical configuration of this node looks like this:
<cesCommunicationFactory type="Coveo.AbstractLayer.Communication.CES.CESCommunicationFactory, Coveo.AbstractLayer">
<cesCommunicationConfiguration type="Coveo.AbstractLayer.Communication.CES.CesCommunicationConfiguration, Coveo.AbstractLayer" />
</cesCommunicationFactory>
CloudPlatformCommunicationFactory
Cloud only
The Coveo Platform communication factory is the factory responsible for enabling communication between the Coveo Platform and Sitecore. A typical configuration of this node looks like this:
<cloudPlatformCommunicationFactory type="Coveo.CloudPlatformClient.Communication.CloudPlatformCommunicationFactory, Coveo.CloudPlatformClient">
<cloudCommunicationConfiguration type="Coveo.CloudPlatformClient.Configuration.CloudCommunicationConfiguration, Coveo.CloudPlatformClient" />
</cloudPlatformCommunicationFactory>
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 web.config
file of your Sitecore instance. To enable logging in whatever part of the code, modify the logger’s name.
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 via that logger.
<log4net>
<appender name="CoveoLogger" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
<file value="$(dataFolder)/logs/Coveo.Search.{date}.txt" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
</layout>
</appender>
<logger name="Coveo" additivity="false">
<level value="INFO" />
<appender-ref ref="CoveoLogger" />
</logger>
</log4net>