How to bind the search results to the new created display template?

I encountered a problem when I try to customize my search results. Please do me a favor.

What I have done is added a site column (single line), and then added the column to some existed custom lists, and created some items with some values in the new added column. And then customize my display template and result types, and run the full crawl job.

The following is what i customized.

1. Copy the Default_Item.html in the Search display template which located at the master page gallery.

2. Customize the new copied template, change the title to Default_item_Index.html, and add some scripts in the Js part.

3. Upload the file to the gallery folder, and update the managed properties mapping, add the new slot and managed property mapping, i.e. 'MytextOWSTEXT':'MytextOWSTEXT'

4. Create a new result type in site collection level by copying the default SharePoint List Item result type, and change the display template in the new copied result type.

5. run the full crawl jobs again, and search some value in the search box.

The problem is when the result item type is SharePoint List Item, it doesn't display as the new created display template, it used previous Default_Item.html template, it's wired, because i thought that it should use the new customized display template.

ps. For the new created list, the template and the results were bound very well, is it a known issue or default logic, or i did something wrong?

Please do me a favor.

Thanks in advanced 

March 25th, 2015 9:54pm

Hi Matthew,

As I understand, the SharePoint list item doesn't display as the new created display template.

Check things below:
1. Because there is already a result type for SharePoint List Item, and you copy the result type and change the display template, and the rules are same as the original result type, so SharePoint may use that instead of the new one, I recommend you to the result type you created by yourself in the Use result types to display items section in search result web part to check if it can work.

2. Check if the custom display template has been published as a major version.

Best regards

Sara Fan

Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 9:43am

Hi,

How is everything going?

Is there anything update about this issue?

Best regards.

Thanks

April 2nd, 2015 9:30pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics