Friday, November 08, 2013

Use of Custom search refinement panel and Content Type in SharePoint 2010

To show the "Content Type" in the "Search Refinement Panel", there are following steps:

1. In Search, default managed property of "Contetnt Type" doesn't work so it requires to create a new managed property and mapped to following crawl properties: ows_ContentType’ and ‘Basic:5’.

2. Run full crawl.

3. Add following xml in refinement panel xml: For example the new content type created is named "SearchContentType" :

< Category    Title="Content Type"    
Description="The Content Type of the item"    Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator"    MetadataThreshold="3"    NumberOfFiltersToDisplay="3"    MaxNumberOfFilters="20"    ShowMoreLink="True"    MappedProperty="SearchContentType"    
MoreLinkText="show more"    LessLinkText="show fewer" />


Now Content Type will start coming in the search page refinement panel.



No comments: