My Sharepoint site uses a content web part to search and return documents on a specific tag. I'd like to add the description for the files to this content web part. I have tried changing the property mappings in the web part properties box to the "description" property, but it's still coming up blank. I've also tried creating my own display templates (based off the existing one but changing the values in the <mso:ManagedPropertyMapping
tags). But I'm still getting blanks, I feel like there is a step I'm missing somewhere?
2 Answers
The trick here is determining the exact field name that is being used for the "description" property. Even out of the box fields can have odd names, different from their Display Names. I have seen "Description" have an internal name od Comments, for example. To determine this, Edit the field and look at the Field parameter od the FldEdit page query string. This will display the actual internal name. (You can use PowerShell too, but this is faster.)
Once you know the internal name look in Search Schema for the Crawled Property of the same name prefixed by "ows_" this is the property that must be mapped to a Managed Property. If it is not, create one. Once created, you must run (or wait for) a full crawl.
Now you can use your managed property.
Also you can get the internal name like this:
- Let's go to a list (in this case "Teamminutes")
- And let's get the internal name for "Sum by Team"
- Change the URL to this:
https://afrait.com/teams/information-technology-workspace/spielwiese/EnglishSubsite/_api/lists/getbytitle('Teamminutes')/items
Note: The essential part is: /_api/lists/getbytitle('Teamminutes')/items
- Then you get in IE this view (only a snippet here):
- Now you can search as Matthew mentioned for this crawled property in the CA and map it:
Hope this helps a little bit.