5

I have specific problem. In search result I want to display certain information from a column called Metadata. So I did this:

  1. Is column mapped in Search Schema? MetadataOWSTEXT - Check
  2. Performed full crawl? - Check
  3. Is it in <mso:ManagedPropertyMapping> tag in display template? 'MetadataOWSTEXT':'MetadataOWSTEXT'- Check
  4. Is it in <div> tag? _#= ctx.CurrentItem.MetadataOWSTEXT =#_ - Check
  5. Is it mapped in corresponding .js file? - Check
  6. Is it mapped with <div> tag in Item_CommonItem_Body.html? - Check
  7. Updated sync issue in Result Types? - Check
  8. Performed full crawl after modifications? - Check

Version: SharePoint 2013 Enterprise

I don't know what I'm doing wrong. Every default Managed property mappings are displaying just fine, but my custom properties displaying blank values...

Thank you in advance for every help.

  • Got exactly the same going on. Everything seems to be set-up properly, but for some reason the properties will just not show. Did you have any luck in the meantime? – Jasper Feb 6 '15 at 7:42
  • Did you publish the search Template as Major Version? Did the html Template have the same datetime value? Also Check if you configured the Managed property in Share searchserver or in the ca (searchservice). NOT on the site only. This can cause the Problem too. – Sascha Feb 6 '15 at 18:15
2

Well we found something, that is not a real solution (We think).

Once you create a new template, you add your mapped properties to <mso:ManagedPropertyMapping> tag BEFORE anything else (that means uploading this custom template to library, publishing it and so on). You must do everything locally and after all desired changes are made, than you upload it to library. After that you wait for SharePoint to create corresponding *.js file and now you can publish it, create New content sources etc.

Every changes we made after all these actions (new content sources, set the template as default) DID NOT displayed. So we had to delete the template a create new one with all new additions.

We don't know what is causing this, but we think that SharePoint suddenly see new display template, map it and than just ignore all changes you make afterwards.

I know, it's not real answer, but I hope it will help you a little. Nevertheless we will keep working on it and I post another findings here.

0

OK, I can tell you what I found.

First of all I am using an Online environment.

I should add the mapping into the Item Display Template and was not necessary to add the mapping into the Common Body Display Template.

The DIV tag, was added to the Common Body Display Template.

Now the key here, is if you are configuring the Search Result Web Part to use Result Types or just to use a single Item Display Template. If you chose the second option you should have this working fine. But...

If you are using Result Types, you need to do a local copy (there is a "copy" option) of the Result Type that is using the Item Display Template where you add the mapping property.

For example, if you add the mapping to the Word Item Display Template, you need to do a local copy (for the site collection) of the Word Result Type. So if you expect to display the managed property value into a PDF result item, you need to do all that stuff for PDF too.

Hope it helps.

0

What I found on SharePoint 2013 and may be helpful for some: At the very end of "mso:ManagedPropertyMapping" element last property was translated to 'name': \u0027\n \n

Looks like for some strange reasons when converting html to js file SP is doing something funny at the end, probably unicoding whole content of this element. My solution was to just put 'dummy':'dummy' at the very end to make sure there will be no more any problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.