How to design a name search engine and results from my friends rank higher?

I have a index which stores every users' profile includes names. So I can search username by issue:
GET /product/users/_search?q=name:all*

And now I want to provide a name search feather which search names and results from their friends rank higher. e.g. if allen and alex are return from the previous query, and if client had followd allen, then allen's score should be higher? Could anybody give me a hint? Many thanks.

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