sortField
- Last Updated: May 29, 2026
- 1 minute read
- Semaphore
- Documentation
The sort field determine the order in which results will be returned. It only applies to the terms and allterms requests.
The “sortField” parameter should be set to the name of the field on which the data should be sorted and the order (“asc” or “desc”) for the results.
For instance to sort by the identifier field in reverse alphabetical order, set “sortField=id desc”
More typically you would want to sort by the preferred label of the concept, in this case set “sortField=name_LANG_pl asc”
Note LANG is a “magic” value that will be substituted by the language code for the current search. For instance name_en_pl is the field containing the name of the concept in English, _pl indicates that this is the preferred label in this language. Note, you cannot sort by multivalued fields, so sorting by alternative label is not possible.
As with the maxresultcount a default value for this parameter can be set in the configuration file, for each handler. The default value, if no other value is set is “name_LANG_pl asc”