Sets sort direction on Content ID for a content query.
Especially useful to get reproducible search results in tests.
Note: order will vary per search engine, depending on how Content ID is stored in the search backend. For Legacy search engine IDs are stored as integers, while with Solr search engine they are stored as strings. Hence the difference will be basically the one between numerical and alphabetical order of sorting.
This reflects API definition of IDs as mixed type (integer or string).
Properties¶
$direction
¶
SortClause.php
:
26
Sort direction One of Query::SORT_ASC or Query::SORT_DESC;.
|
|
$target
¶
SortClause.php
:
33
Sort target, high level: section_identifier, attribute_value, etc.
|
|
$targetData
¶
SortClause.php
:
40
Extra target data, required by some sort clauses, field for instance.
|
|
Methods¶
__construct()
¶
ContentId.php
:
34
Constructs a new ContentId SortClause.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$sortDirection | string | Query::SORT_ASC | - |