How is user search made relevant with first degree connections?

Viewed 14

On any social media platform when I search for users, I get results sorted by count of mutual connections (first degree connections)

Lets say I search for a user named "Rishi" As shown in attached image below Rishi Xyz was top suggestion as we had 10 mutual connections Followed by others descending

help

For full text searches we could always use elastic search, but how do we sort them on mutual connections

How would this scale for millions of users

Any relevant articles where I can study more about its implementation could help

0 Answers
Related