Monday, March 31, 2014

Search refiners in SharePoint 2013 and 2010: differences and some tips

An out of the box SharePoint Server 2010 installation shows six refiners or “Categories” including  Result Type, Site, Author, Modified Date, Managed Metadata columns, and Tags in the refinement panel webpart on the content search page.

The refinement panel webpart provides a summary of search results and enables users to filter results (See Refinement Panel Overview)


Figure Search refiners in SharePoint 2010

Refiners (SP2010) Managed Property
ResultType FileExtension
Site SiteName
Author Author
Modified Date Write
Managed Metadata Columns ows_MetadataFacetInfo
Tags ows_MetadataFacetInfo, popularSocialTags

In SharePoint Server 2013 you will get a different set of default refiners  File Type, contentClass, ContentTypeId, WebTemplate, DisplayAuthor and LastModfiedTime. The way that these search refiners are being rendered is determined by the display template which is selected.  This makes it a lot easier to modify the refinement panel. You will find the different search refiner display templates which are being used in the master page gallery underneath /Display Templates/Filters/ (The full URL will be something like http://yoursharepoint/_catalogs/masterpage/display templates/filters/)



If you look for example at the standard Refinement Item display template, you will also see why why the contentClass, ContentTypeId and WebTemplate are not shown in the search refinement panel.



A common question that you might get when upgrading from SharePoint 2010 to SharePoint 2013 is how to add the Tags refiner back in the refinement panel. This is actually pretty simple, just go to the refiners preview panel and add in the same managed property ows_MetadataFacetInfo.
One of the changes in SharePoint Server 2013 is the fact that refiner counts are not shown anymore by default. Fortunately it is actually quite easy to change this again. You can modify the display template of the refiners – the only thing you have to change is, setting the ShowCounts value to true.



The final result should look like this. If you need to repeat this step on multiple search centers you can use the PowerShell enable refiner count in SharePoint 2013





References:

No comments:

Post a Comment