Permalink
Browse files

News ranking algorithm fixed.

  • Loading branch information...
1 parent 89cde3a commit fc4f8e39d4a838b560f1cab4157a96ec9d5c7782 @antirez committed Mar 1, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 app.rb
  2. +1 −1 app_config.rb
View
@@ -1236,7 +1236,7 @@ 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)+NewsAgePadding
- return (news["score"].to_f)/((age/3600)**RankAgingFactor)
+ return (news["score"].to_f)/((age+3600)**RankAgingFactor)
end
# Add a news with the specified url or text.
View
@@ -42,7 +42,7 @@
NewsEditTime = 60*15
NewsScoreLogStart = 10
NewsScoreLogBooster = 2
-RankAgingFactor = 2.2
+RankAgingFactor = 1.1
PreventRepostTime = 3600*48
NewsSubmissionBreak = 60*15
SavedNewsPerPage = 10

0 comments on commit fc4f8e3

Please sign in to comment.