Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
     Glossary
   eZ Publish 4.x / legacy

 
eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: typo corrected

...

SortClauses are the sorting options for Content and Location Search in "Platform stack", for generic use of API Search see Search Criterions Criteria and Sort Clauses

SortClause consists of two parts just like Criterion and FacetBuilder:

  • The API Value:  "SortClause "
  • Specific handler per SearchEngine:  SortClauses Handler"SortClausesHandler"

The SortClause represent the value you use in the API, while SortClauseHandler deals with the business logic in the background translating the value to something the Search engine can understand.

Info

Implantation and Implementation and availability of a handler sometimes depends on SearchEngine capabilities/limitations.

Common concepts for all SortClausesSort Clauses 

For how to use each and every SortClause see list below as it depends on the SortClause Value constructor, but in general you should be aware of the following common concept:

  • sortDirection: The direction to perform the sort, either Query::SORT_ASC (default) or Query::SORT_DESC

List of SortClausesSort Clauses 

The list below reflects SortClauses Sort Clauses available in eZ\Publish\API\Repository\Values\Content\Query\SortClause namespace (it is also possible to make custom SortClause):

Info

Arguments starting with "?" are optional.

Only for LocationSearch

SortClauseSort ClauseConstructor arguments description
Location\Depth
Status
colourYellow
title>= 5.3/2014.03
?sortDirection
Location\Id
Status
colourYellow
title>= 5.3/2014.03
?sortDirection
Location\IsMainLocation
Status
colourYellow
title>= 5.3/2014.03
?sortDirection
Location\Depth
Status
colourYellow
title>= 5.3/2014.03
?sortDirection
Location\Priority
Status
colourYellow
title>= 5.3/2014.03
?sortDirection
Location\Visibility
Status
colourYellow
title>= 5.3/2014.03
?sortDirection

Only for ContentSearch

SortClauseSort ClauseConstructor arguments description
LocationDepth
Status
colourRed
titledeprecated in 5.3/2014.03
Use LocationSearch with Location\Depth, since LocationDepth can give unpredictable results when content has several locations.
LocationPath
Status
colourRed
titledeprecated in 5.3/2014.03
 
LocationPathString
Status
colourRed
titledeprecated in 5.3/2014.03
 
LocationPriority
Status
colourRed
titledeprecated in 5.3/2014.03
Use LocationSearch with Location\Priority, since LocationPriority can give unpredictable results when content has several locations.

Common

SortClauseSort ClauseConstructor arguments description
ContentId?sortDirection
ContentName?sortDirection
DateModified?sortDirection
DatePublished?sortDirection
Field

typeIdentifier as string, fieldIdentifier as string, ?sortDirection, ?languageCode

Status
colourYellow
title>= 5.3/2014.01
as string

MapLocationDistance
Status
colourYellow
title>= 5.3/2014.03
typeIdentifier as string, fieldIdentifier as string, latitude as float, longitude as float, ?sortDirection, ?languageCode as string
SectionIdentifier ?sortDirection
SectionName ?sortDirection