Documentation Index
Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
Use this file to discover all available pages before exploring further.
Description
The sort directive for selecting how the data on the page should be sorted. The sort tag should be wrapped in a Layout Controls Tag.Usage
as element:Directive info
- This directive creates new scope.
Parameters
| Param | Type | Details |
|---|---|---|
| response | string | The name of the response |
| fields | string | Fields to provide sorting on (comma-separated). |
| default-label (optional) | string | Label to display for the ‘default’ sort option when no specific sorts are applied. Usually implies sorting on score or relevance. Default: ‘relevance’ |
| title (optional) | string | Add a title to display. Default: ‘Sort by’ |
| default-order (optional) | string | Attribute to set the default sort order of Sort Fields (asc or desc). Default: ‘asc’ |
| mode (optional) | string | The mode in which the sorting should work, be default click. click: Selecting a sort will sort in the default order, when clicking on a selected sort this sort will be removed, to change the order use the ascending and descending options at the bottom of the dropdown. toggle: Selecting a sort will sort in the default order, when clicking on the selected sort again it will reverse the order. |
Example
Source
Result
