Most sites seem to keep them separate - providing the user the ability to sort content by rating or popularity/most views. I was thinking of combining them into one metric that gives the user a good mix between popular and quality content. What are some of the ways I can do this?

Assume popularity = number of views. I could search for content by rating, then do another search by popularity, finally mixing the results into one list (i.e. 50% of the result from the most popular and 50% highest rated). Another way is to weigh the rating based on views somehow, this would make popularity underscore everything in a way - not sure if its a good or bad thing.

It's for a news aggregation site and my goals is to promote quality content (well written articles) but at the same time getting important/relevant news to their readers might be more important than the actual rating (although they go together as relevant news gets rated higher).

  • I'm not sure this is really possible, or at least desirable, to do, especially depending on the medium. Take movies for example; popularity has very little to do with quality rating for large releases. Mixing the two would likely result in a confusing mix of great underrated movies and terrible but seat-filling blockbusters, which serves neither audience.
    – Ben Brocka
    Jul 22, 2013 at 16:27
  • Or serves both? :)
    – Pking
    Jul 22, 2013 at 16:40
  • Aside from the answer provided below - if you can give your users the traditional option of sorting by individual parameters that would be the way to go. You can add this as a "new" sorting option.
    – Rayraegah
    Jul 22, 2013 at 16:46

1 Answer 1


I'm going to answer this from a non-UX perspective this time (because I'm not sure if this belongs here). Your idea is good it might even work provided you do the math right

First of all, you need to understand and establish this fact, Popularity =/= Rating (in terms of value). A content could have 1 view and a rating of 5/5 or 1000 views and a rating of 1/5. This is because not everyone who views ends up voting. This means, if you are going to mix popularity & rating values in your sorting algorithm you need to set some threshold values (I've explained this below)

Why your current approach won't work

Lets do a little experiment on MS Excel to see if your current approach of sorting by rating first then by popularity would work for your 'case'

MS Excel demo Screenshot

Was this your expected / desired result? I hope not - when you sort items using 2 very different parameters, you are and will be, forced to execute the actions one after the other. Parallel processing is not possible in your case.

How to approach your problem for a possible/plausible solution

You need to take into account both popularity (number of views) and rating (average number based on votes by viewers as approval or like or even dislike), and come up with a mathematical expression using both that gives you a new value. You can do this empirically or locate one by doing a little research.

Example: My term for the new value is "hotness" and my formula to calculate this is H = (V * Votes) * 100 / views, where V is how much I value a 'vote' (you can make this variable depending on category etc or keep it a constant). Remember this

Have a look at this table, it should give you a clear idea. I hope this answer helps.

enter image description here

  • To clarify, I meant two searches not sorting twice, e.g. get top 10 highest rated, do another search for top 10 most popular, then present the search results together mixed together. I've changed the wording in the the question. Your "hotness" formula is a nice example of the second approach (modifying the search algorithm to take into account both rating and popularity).
    – Pking
    Jul 22, 2013 at 16:44
  • I made a 'hotness' algorithm for a client, to eliminate very 'old' popular articles from the first page of the result-view when sorted. The "V" factors was given a decay / boost based on the date on which the article was posted and category it belonged to (to eliminate off-topic stuff). It has several uses - just a FYI.
    – Rayraegah
    Jul 22, 2013 at 16:52
  • Thanks. I'm not sure in what way yet (linear, exponential, etc) but some kind of decay is to be included.
    – Pking
    Jul 22, 2013 at 17:05
  • Here is an actual algorithm github.com/clux/decay
    – Rayraegah
    Jul 31, 2013 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.