Cannot get document tags to display as links in Smart Search Results transformation

I am trying to display the document tags as links on a search results page that uses the Smart Search Results webpart. I can get the tags to display as I want them on the individual pages, but the same transformation code does not display the document tags within the search results. This is the code that I'm using to display the tags on the individual pages: <%# IfEmpty(Eval("DocumentTags"),"", CMS.Blogs.BlogTransformationFunctions.GetDocumentTags(Eval("DocumentTagGroupID"), Eval("DocumentTags"), "/tagged")).ToString() %> and that is working as I expect. However, that same code doesn't display the document tags from those pages in the search results. I tried this code: <%# GetSearchValue(IfEmpty(Eval("DocumentTags"),"", CMS.Blogs.BlogTransformationFunctions.GetDocumentTags(Eval("DocumentTagGroupID"), Eval("DocumentTags"), "/tagged")).ToString()) %> in the transformation for the search results webpart but that did not change the outcome. I've attached some images to illustrate what I'm seeing on the site. Is there a special method that I need to use for pulling in the document tags as links in search results like they appear on the individual pages? Can anyone shed some light on this?

Correct Answer

The issue is, that the smart search result data set contains a limited set of data, compared to a repeater, containing all document (page) fields. You need to use the GetSearchValue method, instead of the Eval method for some of the fields. You can find the data columns, which you can access directly with the Eval method in the search results transformation in this article (sorry for the low quality image):

I am having a weird issue, i have added tags to custom document type.
On the parent page "BlogFunctions.GetDocumentTags" doesn't display any tags, but on inner pages it does.
for ex: on http://dev.zdirad.com/Media it does not display any tags, but to http://dev.zdirad.com/Media/News
it displays. Both documents are using same template and media is assigned to tag group and all child pages inherit it.