You are here


The sort element lets you sort the results of a query. It specifies an array of sort specifications. The array order defines the ordering precedence.


The parameters for the sort element are:
Parameter Type Description Default value
type String This specifies how to order - either by using a field or based on the position of the document in the index, or by score/relevance. The default value is FIELD.
field String The name of the field.  
ascending Boolean The sorting order.

The ordering of nulls is determined by the Solr configuration.

The default value is false.


Example of sorting the result:

"sort": [{"type":"FIELD", "field":"cm:description", "ascending":"true"}]
Note: The sort element is not supported for CMIS queries.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.