You can sort events and places by a combination of:
availableTo(most commonly used to show events that will be ending soon first)
By default, events are sorted by
It is possible to change the sort
- Ascending order (from smallest to biggest value) by using
- Descending order (from biggest to smallest value) by using
For an in-depth look how relevance (
score) is calculated, see the elasticsearch documentation.
Example with multiple sort options:
Note that if you use multiple
sort options, the order of the
sort options influences the order in which they are sorted. In the example above, all events and places will be sorted by
availableTo first, and afterwards any events or places with the same
availableTo are sorted by
When searching by geo distance, it is possible to sort the results by the distance from the given coördinates.
You can still combine this sort field with other sort fields:
distance field can ONLY be used to sort when the
distance parameter are also present.
Lees verder: Status