as i am doing shorting on multiple fields
{ followersCount: { order: 'desc' } },
{ averageRating: 'desc' },
{
_geo_distance: {
coordinates:
[lng,
lat],
order: "asc",
unit: "km",
distance_type: "arc",
ignore_unmapped: true
}
},
The business are sort 100% on first short than on 100 % on second sort key
for example [7,5,7] ,[2,9,9] ,[6, 3,8]
the result is [7,5,7] ,[6, 3,8] ,[2,9,9]
i am bit confused here can we define the weight to sorting key is it is possible
i have to sort according this criteria
- Count of follower - 50%
- Average rating of the business - 40%
- Location - the closest businesses will be given more score - 10%