Skip to content

Path Sort Clause

The Location\Path Sort Clause sorts search results by the pathString of the location.

Note

Solr search engine uses dictionary sorting with the Location/Path Sort Clause.

Arguments

  • (optional) sortDirection - Query or LocationQuery constant, either Query::SORT_ASC or Query::SORT_DESC

Example

1
2
3
4
5
use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause;

$query = new LocationQuery();
$query->sortClauses = [new SortClause\Location\Path()];