Making a Sitecore Field Sortable
Making a Sitecore Field Sortable
Sortable fields can be used with the Coveo Hive Field Sort component (see Coveo Hive Renderings List - Coveo Field Sort).
By default, any Sitecore field of type date, long, or double is automatically set as sortable in the Coveo index.
To set a Coveo for Sitecore field of any other type, such as a string, as sortable, you need to edit the Coveo Search Provider configuration.
-
Open the
Coveo.SearchProvider.Custom.configfile with a text editor. -
In the
fieldMap/fieldNameselement, add a new element like the following (you must replacemysitecorefieldwith the actual name of the Sitecore field):<fieldType fieldName="mysitecorefield" isSortable="true" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" />NoteThe
fieldMap/fieldNameselement is located in thedefaultIndexConfigurationelement. Field settings defined in thedefaultIndexConfigurationelement are applied to all indexes that reference thedefaultIndexConfigurationelement. To apply field configurations on a specific index, see Managing Fields for a Specific Index. -
To synchronize these field settings changes into your search indexes, an indexing action must be performed. Alternatively, the
/coveo/api/index/v1/indexes/synchronizeAPI POST call can be used (see Synchronize Coveo for Sitecore Configuration).