Each custom sort criterion typically follows one of the following templates:
-
facet,order
-
facet,order,sort_type
Where:
-
facet
is any search facet configured for the portal. -
order
specifies the sort order. This parameter accepts one of the following values:-
ASC
for ascending. -
DESC
for descending.
-
-
sort_type
specifies the sort type. This parameter accepts one of the following values:-
ALPHA
for lexicographic order. -
NATURAL
for natural sort order.
-
It is possible to configure multiple cascading criteria by separating each criterion with a ;
(semi-colon) as in the following examples:
-
ft:relevance,DESC;Version,ASC,NATURAL;Category,DESC,ALPHA
-
ft:relevance,DESC;ft:isPublication,DESC;ft:title,ASC,NATURAL
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. See Computing relevance indicators for each result for more details.
- The custom relevance sort criteria overrides the default relevance sort criteria for the Search page as well as for all other search-based features and web services.
- 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).