Field Sort Clause¶
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
sortDirection(optional) - Query or LocationQuery constant, either
$query = new LocationQuery(); $query->sortClauses = [new SortClause\Field('article', 'title')];