One of the new features in SharePoint 2010 search is the refinement panel. In enables the user to filter the search results by metadata information (not only from the Manage Metadata Service). You may use any Managed Property available via search.

To select the metadata properties to use in the refinement panel, you have to configure an xml-structure that is used in the Refinement webpart. A snipped from this xml-definition looks like this:

<Category Title="Author" 
      Description="Use this filter to restrict results authored by a specific author" 
      Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" 
      MetadataThreshold="5" 
      NumberOfFiltersToDisplay="4" 
      MaxNumberOfFilters="20" 
      SortBy="Frequency" 
      SortByForMoreFilters="Name" 
      SortDirection="Descending" 
      SortDirectionForMoreFilters="Ascending" 
      ShowMoreLink="True" 
      MappedProperty="Author" 
      MoreLinkText="show more" 
      LessLinkText="show fewer" />

In the MappedProperty-attribute you define the Managed Property to use for this refinement entry.

When you modify the Filter Category Definition in the properties of the Refinement webpart, it’s important that the checkbox “Use default configuration” is not checked, when you save your changes.

By modifying this filter definition, you are able to create your own refinement settings that can replace the out-of-the-box settings provided by Microsoft.

For the filter definition you will find a (poor) documentation in MSDN. Sometimes it’s a kind of try and error to find the right solution.

Advertisements