I recently happened to work on an issue where the “Trending Tags” web part which you see in your SharePoint My site wasn’t working as expected in our environment and we had to get that fixed.
This post is mainly intended for those who have now idea about the “Trending Tags web part “ and for those who have this functionality broken in their environment and see a notification as shown below .
What’s the Trending Tags web part all about?
For those of you who are not aware of the “Trending Tags web part” , this is nothing but a web part which is displayed on the bottom right corner of your SharePoint “My site” page and it displays the most widely used top 5 #Tags in your SharePoint environment .
Where can the # Tags be used?
This can be used by user’s on conversations while posting new updates on their Newsfeed/Site’s Newsfeed and also while replying to someone’s post . A #Tag can be followed and once it’s followed it brings all the conversations related to that #Tag to your Newsfeed.
How does this web part work?
The contents displayed on this web part is mainly based on the search content sources and search crawl. So for any given reason if this not working in your environment, then please make sure that you check your search content source is being crawled properly.
Which crawl does this web part depend on?
This is not specific to any specific crawl .If you’re environment is using continuous crawl which runs every 15 minutes, then the next continuous crawl will pick this #Tag and displays it in the web part or the value of the total number of times this(i.e. specific #Tag) has been used will increase .For instance, if it’s a new #Tag it will display that as 1 use in the web part .If that specific #Tag has already been used by others then it will simply increase the usage count . However , please remember that this web part will only display the most widely used top 5 #Tags in your environment and if you don’t see the one which you mentioned in a post then it’s pretty obvious that the #Tag which you used ranks lower than the other #Tags which are displayed in the “Trending Tags” web part .
Note: Don’t panic if you still see the “Tagging’s been quiet lately. No trending tags right now” notification in the web part even after confirming that your search crawl is running well .This could be simply because that no one in your environment is using #Tags .
What happens behind the scenes?
As I already mentioned earlier, I happened to work with my PFE on this and he was able to help me understand how this stuff works behind the scene.
Listed below is the point mentioned in his blog and please go through it if you’re curious to know how this works:
Listed below is what happens behind the scenes on this webpart:
1.When you browse to your SharePoint mysite, the trending tags webpart appears.
2. The web part 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.
a.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.
b.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. a.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)a. 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.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.