How to Display Trending Posts

Hello Elastic,

I have this requirement where my user would like to display the top trending post, can refer image below :

I showed them that we do have analytics based on the queries, but to specifically shown the top trending post with most likes, should that be done from the front end side? Correct me if I'm wrong or we able to capture analytics also based on top view post?

I believe we can capture the top search queries but the top trending post, can elastic enterprise search do that?

Thank you.

HI @aisyaharifin !

You'll need to add analytics for that, as App Search can't tell about the likes / views / comments otherwise.

App Search does not provide specific analytics for that use case, but just queries, clicks and counts. Elasticsearch Behavioral Analytics only allows for search, click and page view events.

You can create your own index and collect analytics from the frontend side, sending an event to be stored on an Elasticsearch index, and then query that index using aggregations to summarize statistics and include them into your App Search index. That way you can use App Search sorting and filtering to satisfy your requirement.

Hi @Carlos_D , so to clarify on this, based on my understanding, I can display the trending post by implementing Elastic Behavioral Analytics to collect the user behavior from the front end side? Correct me if I'm wrong, thank you.

That is correct. You need to:

  • Collect user behaviour using Behavioral Analytics from the front end
  • Merge the retrieved information from analytics into your posts Engine, so posts have additional information on the number of views, etc. This can be done as a scheduled job
  • Use the new information included in the Engine to do sorting.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.