Building Search Applications in SharePoint Server 2010 for Search and FAST Search Server 2010 for SharePoint: Lesson 5 Lab

This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it.

Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.

This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.

© 2010 Microsoft Corporation. All rights reserved.


Building Search Applications in SharePoint Server 2010 for Search and FAST Search Server 2010 for SharePoint: Lesson 5 Lab

Summary: This is the lab excercises for Building Search Applications in SharePoint Server 2010 for Search and FAST Search Server 2010 for SharePoint: Lesson 5 Basic Refiners.

Applies to: Microsoft SharePoint Server 2010 | Microsoft FAST Search Server 2010 for SharePoint Federation

Published: September 2010

Provided by: Anthony Butcher, Senior Consultant, FAST - Global Services, EMEA | David de Santiago, Senior Consultant, FAST - Global Services, EMEA | Roberto Fanelli, Senior Consultant, FAST - Global Services, EMEA | Microsoft Corporation

Contents

Basic Refiners Definition 2

Basic Refiners (manual configuration): 2

Basic Refiners (PowerShell) 3

Additional steps 4

Conclusion 6

Basic Refiners Definition

Fast Search for SharePoint Search Center offers out of the box a set of refiners. Refiners allow search user filtering the data by different criteria (date modified, author, site)

Basic Refiners (manual configuration):

In this section we will use an existing crawled property in order to map it to a managed property.

Any other crawled property can be used, for instance from the enterprise crawled if setup.

1.  Click Managed Properties.

2.  Click Add Managed Property.

3.  The property name is the actual name used at query time. Name the property to for instance 'refinerprop'.

4.  Check the refiner property and deep refiner checkbox.

5.  Click Add Mapping.

6.  Select the Format Information category.

7.  Add the format property and click OK on the mapping dialog box.

8.  Click OK on the managed properties page.

Basic Refiners (PowerShell)

1.  In a PowerShell prompt on the FS14 node make sure the fastsearch snapin is added.

2.  Add the property (type 1 specifies text, type 2 integer):

PS> $mp = New-FASTSearchMetadataManagedProperty -Name psrefinerprop -type 1 -description "PS Refiner text property”

3.  Set it to queryable and look at the property.

PS> Set-FASTSearchMetadataManagedProperty -ManagedProperty $mp -RefinementEnabled 1

PS> $mp

4.  Map the format crawled property to the new managed property.

PS> $cp = Get-FASTSearchMetadataCrawledProperty -filter format

PS> New-FASTSearchMetadataCrawledPropertyMapping -managedproperty $mp -crawledproperty $cp

Additional steps

1.  Start a full crawl.

2.  Go to the search site, and perform a query.

3.  At the result page, click Edit page from the site actions menu.

Notice the Refinement Panel Web Part.

4.  Click Edit Web Part.

5.  Click Filter Category Definition under the Refinement section to open the XML editor.

6.  Add the following within the Filter Categories element.

<Category Title="Refinerproperty" Description="Building an Enterprise Search Application: Basic Refiners" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="1" NumberOfFiltersToDisplay="4" MaxNumberOfFilters="20" ShowMoreLink="True" MappedProperty="refinerprop" MoreLinkText="show more" LessLinkText="show fewer" ShowCounts="Count" />

The NumberOfFiltersToDisplay property represents the number of filters displayed (without clicking “Show More” link)

The MaxNumberOfFilters property represents the number of filters displayed (after having clicked the “Show More” link)

The ShowMoreLink property controls whether or not more filter can be displayed

The MappedProperty property represents the managed property used to filter by content.

The MoreLinkText property represents the text to be displayed for “Show More” filters

The LessLinkText property represents the text to be displayed for “Show fewer” filters

The ShowCounts property controls the display of filter counts.

7.  Make sure Use Default Configuration is unchecked.

8.  Click Apply and then click OK.

9.  Save the page by clicking the Save icon in upper left corner.

10. Validate that Refiner appears in Search site by running a new search.

Conclusion

This concludes the lab excercises for Building Search Applications in SharePoint Server 2010 for Search and FAST Search Server 2010 for SharePoint: Lesson 5 Basic Refiners.

Page ii