다음을 통해 공유


Category

Applies to: SharePoint Server 2010

Specifies the filter category for the custom refinement filters.

<Category 
    Title="string"
    Description="string"
    Type="TypeName"
    MappedProperty="PropertyName"
    MetadataThreshhold="value"
    NumberOfFiltersToDisplay="value"
    MaxNumberOfFilters="value"
    SortBy="Frequency|NumericValue|Name|Custom"
    SortDirection="Descending|Ascending"
    SortByForMoreFilters="Frequency|NumericValue|Name|Custom" 
    SortDirectionForMoreFilters="Descending|Ascending"
    ShowMoreLink="True|False" 
    MoreLinkText="string" 
    LessLinkText="string" 
    ShowCounts="Count|Percentage">
    ... 
</Category>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

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, use ows_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.

Child Elements

Element

Description

CustomFilters [Refinement]

Contains the custom refinement filters for the category.

Parent Elements

Element

Description

FilterCategories [Refinement]

Specifies the top-level node of the refinement filter category definition.

See Also

Concepts

Refinement Panel Overview