Skip to end of metadata
Go to start of metadata

 

 

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:

  1. Access the Experience Editor of the Coveo search page you want to edit (see step 1 in Customizing the Properties of Your Search Interface).
  2. Locate the coveo-sorts (or coveo-sorts-MVC) placeholder just above the search interface, on the right hand side, and click it.
  3. Click Add here to insert a sort component.
  4. In the Select a Rendering dialog, click the desired sort component and click Select.
  5. In the Control Properties dialog, specify the following properties depending on the sort component you chose:
    1. In the Basic Settings section, enter a Title for the sort component. This title will be displayed in the search interface.
    2. Depending on the kind of sort, fill out at least the following additional fields:

      Coveo Relevancy SortOnly the Title is mandatory
      Coveo Date SortOnly the Title is mandatory
      Coveo Field SortSort Field: choose a field on which you wish to base the sorting.
    3. In the Id section:

      1.  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.

        Icon

        If you do not set a unique identifier yourself, Coveo for Sitecore will generate one for you. You are strongly encouraged to choose your own unique and meaningful identifier.

    4. Click OK.

  6. Save and publish your page.
  7. Validate that the component appears in your search interface.
  8. Validate that search results appear in the correct order.
Icon

Refer to Field Sort Component Properties to learn more about the various properties of a Sort component.

What's Next?


You can now proceed to Inserting and Customizing a Facet Range Component.