hubermedia documentation 2015 html
sort
Description
The result can be sorted via this parameter. See more details in the Query Language Introduction chapter.

 

All Query Language - Prefixes can be used for ordering.

However, not all fields are useful.

Specification of the sorting direction (asc or desc) is obligatory.

It is possible to combine sorting criterias that are comma delimited.

If you specify a sort module (see: possible values) using an additional search criteria is usually senseless.

Type
String
Syntax

&sort={String}

 

String in the form: [field or sort mode] [asc/desc]

 

possible values for sort mode:

Parameter Description
relevance Default value
random All results are displayed in random order (disables querycache)
random(param) All results are displayed in random ordner (based on timestamp, uses querycache). sort=random(time$CountSeconds). The random order will be the same for the given seconds, but therefore is cacheable and much faster.
distance

The results are sorted from nearest to most distant because "asc" order is specified.

To use this sort mode the geo sort parameters (latitude, longitude, distance) must be supplied. This sort mode will also be automatically used if the Latitude/Longitude - Parameter are supplied.

Please note also the Distance - Parameter limits the search.

distancerelevance

The results are sorted not only by distance, but also according to the relevance.

Here the calculated relevance score is boosted by a certain percentage depending on how close the item coordinates are to the given Latitude/Longitude - Parameter values. The boost is grouped in 1km, 2km, 5km, etc. tiers.

changedrelevance

The results are sorted according to how relevant the items are in context of the requested query.

But objects, whose last updated was carried out until recently are weighted ("desc"), later.

       

possible values for fields:

see Query Language - Prefixes

Samples

http://meta.et4.de/rest.ashx/search/ET2014A.xml/?experience=md&type=All&limit=10&sort=title%20desc&mkt=en-GB

http://meta.et4.de/rest.ashx/search/ET2014A.xml/?experience=md&type=All&limit=10&sort=random&mkt=en-GB

http://meta.et4.de/rest.ashx/search/ET2014A.xml/?experience=md&type=All&limit=10&sort=class_dehoga%20desc,%20price%20desc&mkt=en-GB

http://meta.et4.de/rest.ashx/search/ET2014A.xml/?experience=md&type=All&limit=10&Latitude=49.1&Longitude=12.5&sort=distancerelevance%20asc&mkt=en-GB

 

 


© hubermedia 2018 Privacy Statement Imprint