Skip to content

Sort Clause reference

Sort Clauses are the sorting options for Content and Location Search and Repository filtering.

Capabilities of individual Sort Clauses can depend on the search engine.

All Sort Clauses can take the following optional argument:

  • sortDirection - the direction of the sorting, either Query::SORT_ASC (default) or Query::SORT_DESC

Sort Clauses

Sort Clause Sorting based on Content Search Location Search Filtering Trash
ContentId Content items' ID ✔ ✔ ✔
ContentName Content names ✔ ✔ ✔ ✔
ContentTranslatedName Translated content names ✔ ✔
ContentTypeName Content items' content type name ✔
CustomField Raw search index fields ✔ ✔
DateModified The date when content was last modified ✔ ✔ ✔
DatePublished The date when content was created ✔ ✔ ✔
DateTrashed The date when content was sent to trash ✔
Depth Location depth in the content tree ✔ ✔ ✔
Field Content of one of content item's fields ✔ ✔
Id Location ID ✔ ✔
IsMainLocation Whether a location is the main location of a content item ✔
MapLocationDistance Distance between the location contained in a MapLocation field and the provided coordinates ✔ ✔
Path PathString of the Location ✔ ✔ ✔
Priority Location priority ✔ ✔ ✔
Random Random seed ✔ ✔
Score Score of the search result ✔ ✔
SectionIdentifier ID of the Section content is assigned to ✔ ✔ ✔
SectionName Name of the Section content is assigned to ✔ ✔ ✔ ✔
UserLogin Login of the content item's creator ✔
Visibility Whether the location is visible or not ✔ ✔