Tuesday, November 15, 2011

Add search refiners to your search

First create your custom managed properties from central admin. I created two - Division & Department.

1.Put the page in edit mode.
2.Choose the drop down menu for “Refinement Panel” and choose Edit Web Part.
3.Open the Refinement section and uncheck the “Use Default Configuration” checkbox. Then edit “Filter Category Definition” xml as follows.
4. Collapse inner tags
5. Under filtercategories, below the second section, add the below line
category Title="Division" Description="Refinement of the Division" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="1" NumberOfFiltersToDisplay="4" MaxNumberOfFilters="20" ShowMoreLink="True" MappedProperty="Division" MoreLinkText="show more" LessLinkText="show fewer"
6. Make sure the metadatathreshold value is not greater than your search result.
7. Similary add tags for all your managed properties.
8. If you want to add count, add ShowCounts="Count" at the end of the tag.

No comments:

Post a Comment