Set Sort Command


The syntax for the set sort command is:

setSort(<fieldName>:<sortOrder>[, <fieldName>:<sortOrder>]*)

There are no defaults for the setSort command.


The set sort command sets the sort order for the results, and then it calls clearAllPaging().

Example - Using the set sort command

  This set sort command sets the sort order to author ascending,
  and removes the sort order of date descending,
  and it resets paging on the ContentType facet field and page number:,or,2,15&s.sort=PublicationDate:desc&s.cmd=setSort(PublicationDate:asc)

Try It