Applicable to the
date attribute types.
The attributes by which the CMS objects should be ordered must be contained in the objects themselves. Attributes in widgets part of the objects are not considered, meaning that you cannot have CMS objects ordered by an attribute belonging to a widget inside of the objects. This prevents unintended ordering results should the objects as well as their widgets contain attributes named identically.
There is a precision limit when sorting string values: Only the first 50 characters of a string are guaranteed to be considered when sorting search results.
attributeOrAttributes(String or Array<String> | [String, 'asc' | 'desc']) – The attribute(s) by which the hits are to be sorted (e.g.
If more than one attribute is specified, the sort direction of each attribute can be set (e.g.
[['_objClass', 'asc'], ['title', 'desc']]). If no direction is specified for an attribute, the default is
asc. Up to five attributes are supported.
direction(optional) (String) – The direction in which the search results are to be ordered. Valid values are
desc(ascending or descending). The default is
ObjSearch – Itself