A sort component allows you to organize search results according to a particular order. The following guide explains how a developer or an administrator can add and set up a basic sort component.
To add a sort component in a search interface:
- Access the Experience Editor of the Coveo search page you want to edit (see step 1 in Customizing the Properties of Your Search Interface).
- Locate the
coveo-sorts-MVC) placeholder just above the search interface, on the right hand side, and click it.
- Click Add here to insert a sort component.
- In the Select a Rendering dialog, click the desired sort component and click Select.
- In the Control Properties dialog, specify the following properties depending on the sort component you chose:
- In the Basic Settings section, enter a Title for the sort component. This title will be displayed in the search interface.
Depending on the kind of sort, fill out at least the following additional fields:
Coveo Relevancy Sort Only the Title is mandatory Coveo Date Sort Only the Title is mandatory Coveo Field Sort Sort Field: choose a field on which you wish to base the sorting.
In the Id section:
In Unique Identifier, type in a unique identifier of your choice. This identifier will be used in the website DOM and must therefore only use alphanumerical characters, underscores, and hyphens.
- Save and publish your page.
- Validate that the component appears in your search interface.
- Validate that search results appear in the correct order.
You can now proceed to Inserting and Customizing a Facet Range Component.