Recommendations for a scoring formula for sorting a location based social network's post feed

27 Views Asked by At

I'm building a location based social networking app. The idea is to allow users to post and interact with people nearby. The main feed of the app would show posts based on their proximity (d = how far the post was posted) and recency (a = how long ago was it posted).

I am trying to come up with a formula which would score each post for sorting and achieve the following objectives:

  • High recency and high proximity posts show first (e.g d=1km, a=1 hour)
  • If a post is high proximity but quite old (e.g. d=1km, a=5 days), slightly further results (e.g. d=5km, a=1 hour) rank higher
  • Very far off posts (e.g. d=10000, a=1 hour) would only rank higher than nearby posts which are extremely old (e.g. d=10km, a=1 year)

We are trying to strike a balance between seeing things which are local enough too be relevant yet fresh. While algorithmic solutions are possible, at this point we are looking for a formula to score and sort posts. Looking for suggestions for suitable scoring formulas.

1

There are 1 best solutions below

3
On

Have you thought of using a bounded radius instead of letting all posts show no matter how far away?

As for a recommendation I would suggest posttimeinmilliseconds/sqrt(distance)