Custom Post Ranking

In our previous implementation of our global feed, we rank posts in chronological order. This means that newer posts will rank higher than older ones, thus, the former will show up higher in the feed. While this is not a bad algorithm, other factors should also be considered to determine the posts’ ranking in the global feed.

With our new custom post ranking algorithm, we are using a smarter ranking in our global feed that supports a score-sorting mechanism. We focus on what we consider as “meaningful interactions”. This means that, aside from the post’s submission time, we also factor in user engagements, i.e., posts with more comments and reactions will have a higher ranking. In addition, we factor in the updates and edits done to the post.

How it Works

The post will be ranked according to these factors:

  • Engagement rate Posts with more comments and reactions will show up higher than posts with less

  • Time of posting Newer posts will show up higher than older posts. Time decay is applied where the score will decrease as the post gets older.

  • Updates Post updates and edits on a post will give the post a score boost. Updates may also include new comments and reactions.

Posts will be ranked using mathematical formulas with the following properties in the post model as variables:

  • commentsCount - number of comments to the post

  • reactionsCount - number of reactions to the post

  • createdAt - date/time the post was created

  • updatedAt - date/time the post was updated

  • editedAt - date/time the post was edited

High engagement rate has a big impact on the ranking. A comment will score twice as much as a reaction. A post’s score will decrease as time goes by. However, updating or editing the post bumps up the score.

The score of each post is calculated for every query. This means that when users want to go to the next page, the score will be recalculated.

How to Configure Ranking

If you want to configure the ranking logic to include more factors such as post type, post creator, etc., you may contact Amity Social Cloud Support to review the ranking logic and apply it to the code accordingly.

In our next implementation phase, we will add ranking configurations in ASC Console so users can update ranking logic without the need to call support.

Limitations

Please note however that our custom post ranking implementation has some limitations currently such as:

  • While your newly created posts will be immediately available in your User Feed, due to the nature of the ranking algorithm, there may be a momentary delay before it appears on the Global Feed.

  • Updating the ranking formula can't be done via ASC console. Please contact Amity Social Cloud Support for the formula validation and applying your ranking logic to the network.

  • You can only see up to 20 posts from each user or community that you are following in the global feed.

  • Old post data will not be migrated, thus, only the posts that are posted using version 5.10 will show in the global feed.

Implementation

For more information on how to implement custom post ranking in your global feed, see our documentation here.

We also provide UI Kit guides for custom post ranking for iOS and Android.

Last updated

#3026: New Content: Technical FAQ

Change request updated