Browse files

Ranking algorithm tuned for low traffic sites.

  • Loading branch information...
1 parent f2d17cd commit c8dc696390a660a85031ae11c90ccdbc53da8e03 @antirez committed Oct 9, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 app.rb
  2. +2 −2 app_config.rb
View
4 app.rb
@@ -1251,8 +1251,8 @@ def compute_news_score(news)
# The general forumla is RANK = SCORE / (AGE ^ AGING_FACTOR)
def compute_news_rank(news)
age = (Time.now.to_i - news["ctime"].to_i)
- rank = ((news["score"].to_f-1)*1000000)/((age+NewsAgePadding)**RankAgingFactor)
- rank = rank-1000 if (age > TopNewsAgeLimit)
+ rank = ((news["score"].to_f)*1000000)/((age+NewsAgePadding)**RankAgingFactor)
+ rank = -age if (age > TopNewsAgeLimit)
return rank
end
View
4 app_config.rb
@@ -42,11 +42,11 @@
NewsEditTime = 60*15
NewsScoreLogStart = 10
NewsScoreLogBooster = 2
-RankAgingFactor = 1.5
+RankAgingFactor = 1.1
PreventRepostTime = 3600*48
NewsSubmissionBreak = 60*15
SavedNewsPerPage = 10
-TopNewsAgeLimit = 3600*48
+TopNewsAgeLimit = 3600*24*30
# Footer links
FooterTwitterLink = false

0 comments on commit c8dc696

Please sign in to comment.