Share via


Search Results Web Part

You use the Search Results Web Part to display search results from a single search provider. The Web Part has two configurable tabbed views. The tabbed view can display either the catalog search results or the site content search results. Site content searches are configured to use Enterprise Search or Search Server 2008.

Architecture

The Web Part has two tabs for different types of search results: Product Catalog and Site Content. You must associate the Search Results Web Part control with a Search Provider Web Part, and set a property in the Search Results Web Part that determines which provider's search results to display. Multiple instances of the Search Results Web Part can exist on the same page, and may have their search provider (Commerce Server 2009 or SharePoint) independently configured.

Properties

The following table lists the mapping of the properties for the Search Results Web Part.

Property

Maps to

CSS Class

CssClass

"No records found" text

GeneralNoRecordsFoundText

"No results" Xsl template

NoRecordsFoundTemplate

Category to search

ProductCategory

SharePoint search scopes

Scopes

Phrase to search

SearchingKeyword

SharePoint Site Search Target URL

SPSiteUrl

(Tab 1) "Active" indicator image URL

TabOneActiveImageUrl

(Tab 1) Content type

TabOneContentType

(Tab 1) Tab display name

TabOneHeaderText

(Tab 1) "Inactive" indicator image URL

TabOneInactiveImageUrl

(Tab 1) "No results found" text

TabOneNoRecordsFoundText

(Tab 1) Query filter

TabOneQueryFilter

(Tab 1) Properties to retrieve

TabOneRequiredProperties

(Tab 1) # of results per page

TabOneResultsPerPage

(Tab 1) Default sorting property

TabOneSortBy

(Tab 1) Sorting Properties

TabOneSortingProperties

(Tab 1) Template

TabOneTemplate

(Tab 2) "Active" indicator image URL

TabTwoActiveImageUrl

(Tab 2) Content type

TabTwoContentType

(Tab 2) Tab display name

TabTwoHeaderText

(Tab 2) "Inactive" indicator image URL

TabTwoInactiveImageUrl

(Tab 2) "No results found"

TabTwoNoRecordsFoundText

(Tab 2) Query filter

TabTwoQueryFilter

(Tab 2) Properties to retrieve

TabTwoRequiredProperties

(Tab 2) # of results per page

TabTwoResultsPerPage

(Tab 2) Default sorting property

TabTwoSortBy

(Tab 2) Sorting properties

TabTwoSortingProperties

(Tab 2) Template

TabTwoTemplate

Customization

You can customize the Search Results Web Part by using XSLT transformations and Web Part parameters. All default XSL templates are in the SharePoint list of templates.

Error Handling

There is no design-time error handling required for this Web Part.

API Dependencies

This Web Part uses the Microsoft Multi-Channel Commerce Foundation Search API.

See Also

Other Resources

Developing with SharePoint Commerce Services

Catalog System Web Parts

Working With the Search Results Web Part