How is "TOP topics" list calculated?

I tried to search for but could not find any overview of the algorithm to display /top/xxx topics , e.g. /top/monthly.

At least, what variables are considered and with what weight? What is more important and what is less? I need this to explain to my users which will participate in “top topic of the month” contest.

1 Like

Have a look at the top_topic.rb file :wink:

https://github.com/discourse/discourse/blob/master/app/models/top_topic.rb#L143-L192

5 Likes

It would seem natural to me for this score value to come back in the top topics API response objects. Is that present somewhere that I’m overlooking?

Because I am accumulating top posts over time, I want to have a way to compare how “top” they are relative to one another. Therefore, I’m using this formula as a starting point.

This topic was automatically closed after 3178 days. New replies are no longer allowed.