SharePoint 2013 Trending Tags Webpart


A customer of mine recently had some questions about how the trending tags webpart works in SharePoint 2013. There's isn't a ton of info out there, so I figured I'd share my lessons learned. As always, a thanks goes out to Joe Rodgers - http://blogs.msdn.com/josrod/.

How the webpart works
  1. When you browse to your mysite, the trending tags webpart appears.
  2. The webpart checks the Distributed Cache to see if data is there about trending tags, and renders it, if there's data. If there isn't, it queries search for the most recent tags AND puts that data into the DC.  
    1. The search query will only find tags that have been crawled/indexed, so make sure your crawls are running. Any type of crawl should be sufficient.
    2. To see what search sees for trending tags, see the next section.
  3. The Trending Tags data lives in the DC for 15 minutes. After 15 minutes, the data expires and is evicted from the cache. New data will not enter the cache until the PeopleManager.GetTrendingTags method is called. From what I can tell, only the trending tags web part calls this method. It's a client side call/CSOM, so you could call it manually if you have a need.  
    1. PeopleManager.GetTrendingTags - https://msdn.microsoft.com/EN-US/library/office/jj665759.aspx  
  4. The activity feed timer jobs do not appear to call this method, so they will not update trending tags data in the cache if run manually. (They shouldn't need to do this work)
 
Finding trending tags via search
  1. Download the SharePoint 2013 search query tool - http://sp2013searchtool.codeplex.com/
  2. Set Connection String and authentication info. (You can run this tool anywhere since it uses CSOM)
  3. Enter the following query text. Modify date/time to desired. (the webpart shows the last 7 days)
    1.  ContentTypeId:0x01FD* write>="2015-07-01 00:00:00Z"
  4. Add the following to the Refiners box. By default we show up to 20, most to least popular
    1. ​Tags(filter=20/0/*,sort=frequency/descending)
  5. Click the run button and view the results
  6. The refinement tab will show the tags. The "Refinement Name" and "Refinement Value" show the actual tag. There is a GUID in front of it.

 Hopefully this will help someone with there experiences around how this functionality works.

Comments (0)

Skip to main content