There are various reasons for the SharePoint 2013 search display template missing managed property values. This blog post contains a checklist that may help you to find out where things go wrong.
SharePoint 2013 Search missing managed property value issue:
For example, we want to display the Seat Number in the people search display template. We created a new custom managed property and added it to the header of the search display template as the following:
Somewhere in the display template, we print out the seat number with following line of code.
_#= SeatNumber =#_
Wait until the search service has finished the full crawl; we are expecting the SeatNumber displayed on the search results. The issue is that the new custom managed property value is always empty.
First of all, we need to check the SeatNumber managed property value via Search query tool. (Download link for SharePoint 2013 Search Query Tool https://sp2013searchtool.codeplex.com/ ).
Make sure “SeatNumber” is in the “Select Properties”.
If the SeatNumber value is empty, then you should continue investigating on search service.
- Check the search schema and make sure SeatNumber managed property is correct.
- Check the search service account, and make sure it has access to the content.
- Full crawl again. And check the error messages from the crawling log
If the SeatNumber value shows on the Search query tool results, then you should check the following list of items:
- Is the managed property added to the top of the display template correctly? Make sure there is no error like missing comma or single quote.
The managed property values for this display template are stored as a JSON object inctx[‘DisplayTemplateData’][‘ManagedPropertyMapping’]You should be able to find your managed property there as I did in the above screenshot.
- If it is still not showing, then go to the search site settings > search > result types, check if you need to sync the managed property. Please pay attention to the following screenshot with the correct location for result types.
If you get a notification like the following. Simply click the Update link in the message box. The result types are updated with your display template changes:
After all the above check list items been checked out, your new managed property should now flow through into the search results.