Make a Sitecore field sortable
Make a Sitecore field sortable
Sortable fields can be used with the Coveo Field Sort component (see 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 (for example, a string) as sortable, you need to edit the Coveo Search Provider configuration.
To configure a Sitecore field as sortable
-
Open the
Coveo.SearchProvider.Custom.config
file in a text editor. -
In the
fieldMap/fieldNames
element, add the<fieldType>
element below. You must replacemysitecorefield
with the Sitecore field name (not the Translated Name).<fieldType fieldName="mysitecorefield" isSortable="true" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" />
NoteThe
fieldMap/fieldNames
element is located in thedefaultIndexConfiguration
element. Field settings defined in thedefaultIndexConfiguration
element are applied to all indexes that reference thedefaultIndexConfiguration
element. 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/synchronize
API POST call can be used.
You can combine isSortable
with the other settings presented in this section.