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/.
- When you browse to your mysite, the trending tags webpart appears.
- 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.
- 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.
- To see what search sees for trending tags, see the next section.
- 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.
- PeopleManager.GetTrendingTags – https://msdn.microsoft.com/EN-US/library/office/jj665759.aspx
- 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)
- Download the SharePoint 2013 search query tool – http://sp2013searchtool.codeplex.com/
- Set Connection String and authentication info. (You can run this tool anywhere since it uses CSOM)
- Enter the following query text. Modify date/time to desired. (the webpart shows the last 7 days)
- ContentTypeId:0x01FD* write>=”2015-07-01 00:00:00Z”
- Add the following to the Refiners box. By default we show up to 20, most to least popular
- Click the run button and view the results
- 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.