Skip to content
Tx Platform
Sorting

Sorting Object🔗︎

Field 🔗︎ string required

Field🔗︎

The field name. Two special "fields" exist: _reranker and _score. _score means sorting by the engine score, _reranker means sorting by reranker score. For sorting with type _reranker a reranker needs to be configured. A sorting on field _reranker cannot have subsortings on other fields and cannot have a custom order.

Order 🔗︎ string

Order🔗︎

Optional order of the sorting. Allowed values are: ASCENDING, DESCENDING (case sensitive!). The default behavior depends on the data type of the field: DESCENDING for numeric and date types, ASCENDING for other types. For fields with location data type, results will be sorted according to the distance to the referenceLocation and only ASCENDING order is supported.

ReferenceLocation 🔗︎ string

ReferenceLocation🔗︎

Optional (required for fields with location data type specified) String representation of a location point in the form of "LATITUDE LONGITUDE" (e.g. "53.3478 -6.2597"). This is used for distance sorting on a location field.