Custom sort criteria follows this pattern:
<metadata_key>,<order>,<sort_type>
The parameters are the following:
| Name | Mandatory | Description | Allowed values |
|---|---|---|---|
<metadata_key> |
Yes | Any metadata key. | Any valid metadata key name (for example, ft:title, ft:lastEdition, etc.). |
<order> |
Yes | Sort order to apply. |
The <order> is applied to the selected <sort_type>. |
<sort_type> |
No | Type of sort comparison to use. |
ALPHA is the default sort type. If <sort_type> is not set, the sort type is ALPHA. |
It is possible to configure multiple cascading criteria by separating each one using a ; (semi-colon) as in the following examples:
ft:relevance,DESC; Version,ASC,NATURAL; Category,DESC,ALPHAft:relevance,DESC; ft:isPublication,DESC; ft:title,ASC,NATURAL
For more information about custom sort criteria, see Custom sort order.
Users should always set the ft:relevance,DESC criterion as the first criterion in custom sort templates. Downgrading or removing the ft:relevance,DESC criterion may produce unexpected search results.
When two replies are found to be equal once every criterion has been evaluated, the replies are sorted by descending docId (meaning that the newest document appears first).