If you use SharePoint 2013 enterprise search and you find a comment on a blog post in your results it will be given the Default Display Template (Item_Default.js) by default.
It gives 3 values: Title, part of the text, URL
When you click on it, SharePoint uses ViewComment.aspx to show the item. Here you get the title, the full text and information about the creator.
On both places you have no chance to get to the blog post to which the comment is related. My approach was to create a custom display template for this. Sadly the item in SharePoint search has 62 attributes with values but there is no attribute with id or url of parent blog post.
This are the attributes for this comment on a blog post SharePoint knows by default:
- Rank [object Number]
- DocId [object Number]
- Author [object String]
- AuthorOWSUSER [object String]
- BodyOWSMTXT [object String]
- ContentSource [object String]
- ContentType [object String]
- ContentTypeId [object String]
- Created [object Date]
- CreatedOWSDATE [object String]
- DefaultEncodingURL [object String]
- DetectedLanguage [object String]
- DetectedLanguageRanking [object Number]
- DiscoveredTime [object Date]
- DiscussionPost [object String]
- DisplayAuthor [object String]
- DocumentSignature [object String]
- EditorOWSUSER [object String]
- FallbackLanguage [object String]
- FileExtension [object String]
- Filename [object String]
- IndexDocId [object Number]
- InternalFileType [object Number]
- IsContainer [object Boolean]
- IsDocument [object Boolean]
- IsListItem [object Boolean]
- LastModifiedTime [object Date]
- ListID [object String]
- ListItemID [object String]
- MetadataAuthor [object String]
- ModifiedBy [object String]
- ModifiedOWSDATE [object String]
- NonDocument [object Boolean]
- OriginalPath [object String]
- ParentLink [object String]
- Path [object String]
- People [object String]
- ReplyCount [object Number]
- SPSiteURL [object String]
- SPVersion [object Number]
- SecurityId [object String]
- SiteID [object String]
- SitePath [object String]
- SiteTitle [object String]
- Size [object Number]
- Title [object String]
- UIVersionStringOWSTEXT [object String]
- UniqueID [object String]
- UrlDepth [object Number]
- WebId [object String]
- ZCHNAENDBODY [object String]
- contentclass [object String]
- language [object String]
- languages [object String]
- owsID [object Number]
- ResultTypeIdList [object String]
- PartitionId [object Object]
- UrlZone [object Number]
- AAMEnabledManagedProperties [object String]
- ResultTypeId [object Number]
- RenderTemplateId [object String]
- piSearchResultId [object String]
Has anyone a hint or approach to give my users a way to get from the search result of a comment to the realted blog post?
Thanks in advance!
Disclaimer: I used StackExchange search and Google intense before posting this. Only related item I found was Find the blog post associated with a comment programmatically which did not give me the possibiltity to resolve my issue.