Skip to content

Field Sort Clause

The Field Sort Clause sorts search results by the value of one of the content items' Fields.

Search results of the provided content type are sorted in Field value order. Results of the query that do not belong to the content type are ranked lower.


  • typeIdentifier - string representing the identifier of the content type to which the Field belongs
  • fieldIdentifier - string representing the identifier of the Field to sort by
  • (optional) sortDirection - Query or LocationQuery constant, either Query::SORT_ASC or Query::SORT_DESC


The Field Sort Clause is not available in Repository filtering.


$query = new LocationQuery();
$query->sortClauses = [new SortClause\Field('article', 'title')];