Forum Discussion

ttadej's avatar
ttadej
Advisor
8 years ago

Difference between popularity and kudos.sum(weight) API v2 sort

I'm curious what the difference is between the API v2 messages sort when using 'popularity' vs 'kudos.sum(weight)'. The docs say that 'popularity' is based on kudos, so are those two sorts the same or different? 

 

Thanks

  • ttadej - Popularity does work with the time period.  e.g 

     

    Message A has 20 kudos in 1 week 

    Message B has 15 kudos in 2 days. 

     

    Message B will always have more popularity than message A.  There could be multiple criteria for this(example) which lithium support can answer. 

     

     

    • ttadej's avatar
      ttadej
      Advisor
      That is interesting and I will have to ask Lithium. I've also noticed that DESC and ASC return the same results and if you make the call multiple times you will get different results that toggle back and forth.
      • VikasB's avatar
        VikasB
        Boss

        ttadej  That seems your instance-specific issue.  It works fine in our instance.  Definitely, you should reach out to support. 

  • ttadej

    Sort query results by popularity (kudos only). Most number of the kudos to post increase its popularity.
    Posts not having kudos shows the Negative values in popularity. A negative value for the popularity decreases on the number of page views to the post.

    • VikasB's avatar
      VikasB
      Boss

      ttadej  Sort by popularity and sort by kudo weight will never give you the same results. It does not mean that the post having the higher number of kudos will have the higher popularity. Seems popularity depends on some other factors also. 

      • ttadej's avatar
        ttadej
        Advisor
        Ok.. that is what I am trying to figure out. The documentation is not very specific
    • ttadej's avatar
      ttadej
      Advisor
      Okay.. so how is that different than sorting by kudos.sum(weight)?