Make a Sitecore field sortable
Make a Sitecore field sortable
Sortable fields can be used with the Coveo Field Sort rendering.
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 (for example, a string) as sortable, edit the Coveo Search Provider configuration.
To configure a Sitecore field as sortable
-
Open the
Coveo.SearchProvider.Custom.configfile in a text editor. -
In the
fieldMap/fieldNameselement, add the<fieldType>element below. Replacemysitecorefieldwith the Sitecore field name (not the Translated Name).<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 Manage fields for a specific index. -
Save your changes.
-
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 request can be used.
You can combine isSortable with the other settings presented in this section.