How to Change Document Sort Criteria
To enable the Sort control which enables changing the document sort criteria add the following snippet to the appropriate SmartHub page (such as Index.html or Results.html).
For updating custom SmartHub pages, see How to Customize Your SmartHub User Interface.
Copy
<div class="coveo-sort-section">
<span class="CoveoSort" data-sort-criteria="relevancy" data-caption="Relevance"></span>
<span class="CoveoSort" data-sort-criteria="date descending,date ascending" data-caption="Date"></span>
<span class="CoveoSort" data-sort-criteria="@WilsonsScore descending,@WilsonsScore ascending" data-caption="Rating"></span>
</div>
Each CoveoSort enables a different sort criteria.
You can add or remove CoveoSort spans for any property that is sortable in the search index.