8 Replies Latest reply on Nov 20, 2014 6:30 AM by mcollinge

    Display hot topic trend


      Hi everyone,


      I'm trying to discover how we could build an add-on app that would display the hot topic and the trends.  I've looked at the API but, I haven't found anything we could display all discussion in the last X days ordered by replies & views.  I've looked at both the Jive Apps & Rest API.  What would you suggest?  I had a minute of joy when I saw the search api supported date, but, the search term is required and that would not be valid for my goal.


      At the moment, the only option I see would be to use Content service to return the list of discussions and loop through the result for date (withing X days range) and replies & views in the reply.  It's not really the best performance scenario, I would benefit from a result set that is already limited to my date range and sorted on the fields I need.  I would still need to loop through the result to create the report but it would not require lots of custom logic to reorder and filters.


      Jive 6

      Calling Jive REST Service or Jive Apps API ...


      Looking forward for your help.

        • Re: Display hot topic trend

          Have you seen the trending contents API?

          https://developers.jivesoftware.com/api/v3/6.0/rest/ContentService.html#getTrendingContent(List<String>, int, String, boolean)


          This should work in Jive 6+, and while it might not give you all the detail you want in 1 hit, it should get you a strong starting point. 


          Hope that helps.

            • Re: Display hot topic trend

              Hi Ryan,


              Do you have any more detail and configuration we can do with Trending Content?  I am trying to read anything that explain the Trending Content rules and I tested v3/contents/trending?filter=type(document,discussion) and still cannot find why a file or discussion is selected and another is not, or the order, nor if I can get more records.


              As an example, I manually added views to help identify a pattern, this is what I had return ...

              Reply          Like          Views     type

              0                    0               300     document

              1                    0               160     document

              3                    0               154     discussion

              6                    0               186     discussion

                • Re: Display hot topic trend

                  Hi guys, here more comment


                  I see some REST API that could help me but they lack some detail in the documentation that would help me find the right API call.


                      The following query allows me to view information that is similar to what I would like to report



                      The main issue with the trending API is I don't know what are the criteria for a document to be displayed in the trending result.

                      Are they objects that were recently viewed, are they objects that gets lots of reply, are they objects that gets lots of like, how far does it go back (last 1 hour, last day)?


                      Does anyone know what does the /contents/trending API logic and is there any way to extend it?

                      Has anyone found how to find object most viewed in the last XX hours  and the most reply in the last XX hours?

                            Seems like this didn't find a reply    https://community.jivesoftware.com/message/1328554#1328554


                       I read Ryan response to https://community.jivesoftware.com/thread/271484, do we have an equivalent resource available for using REST in Jive 6?


                    The /contents services allows to find all document updated, but I wasn't able to set my count higher than 100, what is the limit?  Is there options available change it and to sort result in view count or in reply count?  It could resolve most of my issues ...

                    • Re: Display hot topic trend

                      Jean, apologies.  Since trending was first really introduced in Jive 6, there is not a lot of depth to the API in that version.  My understanding is that the cache size on the trending was fixed (to what I do not remember) ... but in the RecommendationQueryServiceHelper class, I see some fixed references to 50 and 500 for various calls.  This is a pre-collection before security is enforced.


                      As for the criteria, this is part of the Jive intelligence to denote relevant / trending content ... so it is based heavily on likes, activity, tags and user social graph...a lot of moving parts that are harder to influence (at least in Jive 6).


                      While not the answer you are looking for (and probably later than you'd like), I hope this helps.