Search Page Refinement Page Mods

documentsearchEver wanted to know how to control that Refinement Panel on your search pages? The out of the box options are OK, but you’re looking for something to take it over the top. With the SharePoint 2010 search Refinement Panel web part, you can add extended find-ability to your content.

You can define how the search refiners are displayed such as sort order, group order, group name, and number of filters to display. Slapping FAST Search on top of your Farm will launch your capabilities into another level….but may also give you some headaches….

I’ve had a request for our Refinement Panel to sort by descending frequency and show over 1000 options. For something like that, I had to create my own groupings with updated attributes. At the end of the day, I had to re-write my own categories and options. But it’s not too difficult if you have the road map to the attributes.

Now, if you’re using FAST Search for SharePoint 2010, then you’re going to have extended capabilities with the Facets. You are able to extend further than just the first 100 items to help define the Facets, which was the case in my site. I’ll leave that details for another post since FAST is a beast in itself.

Here is a list of the common attributes that you’d want to use if you’re ever in the same situation as myself.

Attribute Description
Title A string specifying the filter category title, displayed in the Refinement Panel Web Part.For taxonomy filter categories, use the following titles:

  • The column name for taxonomy filter categories based on columns.
  • Managed Metadata Columns for taxonomy column filter categories that use owsmetadatafacetinfo to display the most appropriate columns.
  • Tags for taxonomy tags filter categories by using owsmetadatafacetinfo to display the generated category.
Description A string specifying the filter category description, displayed as a tooltip in the Refinement Panel Web Part.
Type The type of data that the refinement is based on.Valid values are:

  • Microsoft.Office.Server.Search.WebControls.TaxonomyFilterGenerator  The refinement is based on taxonomy data.
  • Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator  The refinement is based on a managed property.
  • Microsoft.Office.Server.Search.WebControls.RankingModelFilterGenerator  The refinement is based on a ranking model.
  • CustomFilterGenerator  The refinement is based on a custom filter generator.
MappedProperty A string specifying the name of the managed property for refinement. For taxonomy columns or tags, specify ows_MetadataFacetInfo. For popular social tags, useows_MetadataFacetInfo,popularsocialtags.
MetadataThreshhold An integer greater than or equal to 1 that specifies the number of results that must contain a value to display the filter generator under the filter category.
NumberOfFiltersToDisplay An integer from 1 to 50 that specifies the number of filters to display in the filter category.
MaxNumberOfFilters An integer that specifies the maximum number of filters to display when the show more link in the Refinement Panel Web Part is clicked. To display all the filters, specify 0 for this attribute.
SortBy Specifies the sort criteria for displaying the filter values in the Refinement Panel Web Part.Valid values are:

  • Frequency
  • NumericValue
  • Name
  • Custom  Displays filters in the order specified in the XML for the Refinement Panel Web Part.
SortDirection Specifies the sort direction for the filter values.Valid values are Ascending or Descending.
SortByForMoreFilters Applies to: Microsoft SharePoint Server 2010 search
Specifies the sort criteria for the filter values when show more link is clicked. This attribute is optional, and if it is not included, the value specified in the SortBy attribute is used as the sort criteria.Valid values are:

  • Frequency
  • Numeric  Requires a range mapping.
  • Name
  • Custom  Displays filters in the order specified in the XML for the Refinement Panel Web Part XML.
SortDirectionForMoreFilters Applies to: Microsoft SharePoint Server 2010 search
Specifies the sort direction for the filter values when the show more link is clicked.Valid values are Ascending or Descending.This attribute is optional, and if it is not included, the value specified in the SortDirection attribute is used instead.
ShowMoreLink Specifies whether to display the show more link in the Refinement Panel Web Part.true to display the link; otherwise, false.
MoreLinkText A string specifying the link text for the show more link.
LessLinkText A string specifying the link text for the show less link.
ShowCounts Specifies whether the count or percentage is displayed with the filter.Valid values are:

  • Count
  • Percentage

You can specify a custom value for this attribute if the XSLT of the Refinement Web Part is customized to handle the custom value.

 

Reference

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.