I have a number of FAQ lists spread around my site collection (SharePoint 2013 On premises). These lists have special content type, "FAQ Item", that basically has columns for Question, Answer, Area and Topic.
To aggregate all the FAQ items I have a search page, where I get all the items with content type "FAQ Item".
Now I am trying to make a search display template for the FAQ lists for a FAQ search page. I have copied the Item_Default template and added my managed properties at the end of the ManagedPropertyMapping list and I have added them to the div section in the diplay template:
<div id="_#= $htmlEncode(itemId) =#_" name="Item" data-displaytemplate="DefaultItem" class="ms-srch-item" onmouseover="_#= ctx.currentItem_ShowHoverPanelCallback =#_" onmouseout="_#= ctx.currentItem_HideHoverPanelCallback =#_"> _#=ctx.RenderBody(ctx)=#_ <div>_#= STSHtmlDecode(ctx.CurrentItem.AnswerOWSMTXT) =#_</div> <div>_#= STSHtmlDecode(ctx.CurrentItem.Answer0OWSMTXT) =#_</div> <div>_#= ctx.CurrentItem.TopicOWSCHCS =#_</div> <div id="_#= $htmlEncode(hoverId) =#_" class="ms-srch-hover-outerContainer"></div> </div>
The search returns the correct items and I am able to use refiners on tags and topics. But the search results are only displaying the title (the question), a link to the list item and the topic. No parts of the answer is being displayed.
I would like the question, the answer (either the whole answer or like 3 lines of the answer) and the topic to be displayed.
How can I get the answers to be displayed?