SharePoint 2013 Search - Result Type Configuration Issue

Hi All,

I'm  trying to configure a custom display template for the search results in sharepoint 2013. If the search results belongs to a "specific content Type" then I need to display the results in a "Custom display template".

Following configurations are done

1) Created a new Result source by name "Items Matching MY Content Type". In the "Query Transform" the content type is configured and test preview displays result based on the MYContentType.

2) While creating a new Result Type, the following properties has been set :-
Which source should results match? :- "Items Matching MY Content Type"
What types of content should match? :- XML
What should these results look like? :- Custom Display Template

After doing the above configurations, while making the search the xml files with "MyContentType" are not using the Custom Template to display the results.

However it works if I change the "Which source should results match? :- " to "All Sources" in the Result Type configuration.

Is this a known issue or am I doing something wrong? Can anyone please guide.
Thanks in advance Roy Joyson

February 5th, 2013 7:52pm

I believe the issue is that you are not actually searching against the result source you made in step #1.

It's not enough to make a result source, you have to tell the search results web part to use it.

Try this:

1. Go to the Pages library of Search Center

2. Create a new Search Results page

3. Edit the page, then edit the search results web part

4. Change the source for the search results web part to your source

5. Add the page to your Search Center navigation

6. Run the search on that page

Scot

Free Windows Admin Tool Kit Click here and download it now
February 6th, 2013 3:09pm

Thanks lot Scott for the response.  In the search results webpart, under  display templates configuration, the selected option was"Use Result Type rules to decide". So i assumed the already configured Custom template gets displayed once the content Type matches. for time being we have done a work around using ContentTypeId and resolved the issue.

Thank you

Roy Joyson

February 7th, 2013 6:07pm

for time being we have resolved this issue by using ContentTypeId rather than using the ContentType as shown in the below image.

Free Windows Admin Tool Kit Click here and download it now
February 7th, 2013 6:11pm

Have you researched this any further?
I found out that switching from "Equals" to "Equals any of" did the trick. I am now able to filter on "ContentType" instead of "ContentTypeID".

It would be great if there were a debugging tool available.

January 7th, 2014 1:40pm

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

Other recent topics Other recent topics