Anyone know how yii\elasticsearch\ActiveQuery orderBy($columns) / addOrderBy($columns) can be used?
The docs link through to yii\db\QueryTrait and so there is no further information on the format of $columns specific to ElasticSearch.
I know that I can specify $columns as follows and it works:
[
'create_time' => [
'order' => 'desc'
]
]
But the following for example isn’t accepted:
[
['_geo_distance' => [
'coordinates' => [
'lat' => $this->lat,
'lon' => $this->long
],
'order' => 'asc',
'unit' => 'km',
'distance_type' => 'plane'
]]
]
Any help would be appreciated