Sort on multiple fields with different weighted criteria

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

  1. Count of follower - 50%
  2. Average rating of the business - 40%
  3. Location - the closest businesses will be given more score - 10%

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.