Building Search Applications in SharePoint Server 2010 for Search and FAST Search Server 2010 for SharePoint: Lesson 3 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 3 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 3 Importing Keywords, Best Bets & Synonyms.

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

Synonyms Definition 2

Using the Keyword Import Tool for automated creation of keywords and associated Synonyms 3

Best Bets Definition 4

Manually creating Best Bets 4

Using the Keyword Import Tool for automated creation of keywords and Best Bets 5

Conclusion 6

Synonyms Definition

In order to use synonyms the prerequisite is to create an associated keyword.

Use keywords to manually improve the search result. First add the keyword with the associated synonyms (keywords also drive best bets, visual best bets, document promotions or demotions). When a user searches for the keyword, the search result will be displayed with these improvements.

In this lab we are going to describe two ways for creating keywords and associated synonyms and best bets.

Manually creating Keywords and associated Synonyms:

Keywords can be accessed via the Search Center website.

·  Site Actions

·  Site Settings

·  FastSearch Keywords

·  When adding a keyword users get offered the possibility to map synonyms

(Two-way expansion: a query on the key term or any of the synonyms will find documents containing either the key term and - Or the synonym.

One-way expansion: a query on the key term will find documents containing either the key term

And - Or the synonym)

Using the Keyword Import Tool for automated creation of keywords and associated Synonyms

When managing a large number keywords and synonyms the manual way can be time consuming. The Keyword Import tool allows administrators managing large numbers of keywords and synonyms in an automated way via PowerShell scripts and csv files.

The Keyword Import Tool is packaged as a compressed file.

1.  Extract the Keyword Import Tool

2.  The extracted data will contain a set of PowerShell scripts and a CSV folder used to store the CSV files for import (keyword.csv, synonym.csv, bestbet.csv)

3.  Add data in the synonyms.csv with the following format:

The header of the file should contain: SpecialTerm, Synonyms

The following rows will contain keywords and synonyms such as: car, auto

4.  Save the synonym.csv into the CSV folder

5.  Open the configuration.xml file and verify that Import section is configured correctly

<import_CSV_to_FS4SP>

<!-- The FS4SP SearchGroupSetting id you want to import into -->

<siteid>XXXXXX</siteid>

<!-- The path+filenames for the input CSV files -->

<keywordsfile>.\csv\keyword.csv</keywordsfile>

<bestbetsfile>.\csv\bestbet.csv</bestbetsfile>

<synonymsfile>.\csv\synonym.csv</synonymsfile>

<createSiteGroupIfNotExist>False</createSiteGroupIfNotExist>

</import_CSV_to_FS4SP>

6.  The SearchGroupSetting ID can be found running the following commands:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint")

$webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup("http://fastsearch.contoso.com")

foreach ($site in $webapp.Sites)

{Write-Host $site.Id $site}

7.  OR you can simply run the command:

Get-FASTSearchSearchSettingGroup

8.  Run the PowerShell script (PreRequisites: PowerShell 2.0, Admin group user account, Run on admin node of SP2010, PowerShell execution policy set to allow running scripts)

\import_CSV_FS4SP.ps1 -c .\Configuration_Import.xml

9.  More info on the script can be generated by running the script with the following switch:

\import_CSV_FS4SP.ps1 -?

Best Bets Definition

Best bets are manually configured links that are highly relevant for a keyword. When a user searches for the keyword, the best bets links are displayed to complement the list of search results. You can display different best bets for different user contexts and set a time frame for when the best bets should apply.

Manually creating Best Bets

Best Bets can be accessed via the Search Center Website:

·  Site Actions

·  Site Settings

·  FastSearch Keywords

·  Select the Keyword and edit the Best Bet.

Using the Keyword Import Tool for automated creation of keywords and Best Bets

When managing a large number keywords and best bets the manual way can be time consuming. The Keyword Import tool allows administrators managing large numbers of keywords and best bets in an automated way via PowerShell scripts and csv files.

The Keyword Import Tool is packaged as a compressed file.

1.  Extract the Keyword Import Tool

2.  The extracted data will contain a set of PowserShell scripts and a CSV folder used to store the CSV files for import (keyword.csv, synonym.csv, bestbet.csv)

3.  Add data in the bestbet.csv with the following format:

·  The header of the file should contain: SpecialTerm, Title, URL, Description

·  The following rows will contain keywords and Best Bets such as: car, The Best Fast Cars in the World!, http://www.bestmachines.com, Follow the link to access the Best Fast Car Website in the World!

4.  Save the bestbet.csv into the CSV folder

5.  Open the configuration.xml file and verify that Import section is configured correctly

<import_CSV_to_FS4SP>

<!-- The FS4SP SearchGroupSetting id you want to import into -->

<siteid>XXXXXX</siteid>

<!-- The path+filenames for the input CSV files -->

<keywordsfile>.\csv\keyword.csv</keywordsfile>

<bestbetsfile>.\csv\bestbet.csv</bestbetsfile>

<synonymsfile>.\csv\synonym.csv</synonymsfile>

<createSiteGroupIfNotExist>False</createSiteGroupIfNotExist>

</import_CSV_to_FS4SP>

6.  The SearchGroupSetting ID can be found running the following commands:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint")

$webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup("<URL_SEARCH_SITE>")

foreach ($site in $webapp.Sites)

{Write-Host $site.Id $site}

7.  OR you can simply run the command:

Get-FASTSearchSearchSettingGroup

8.  Run the PowerShell script (PreRequisites: PowerShell 2.0, Admin group user account, Run on admin node of SP2010, PowerShell execution policy set to allow running scripts)

.\import_CSV_FS4SP.ps1 -c .\Configuration_Import.xml

9.  More info on the script can be generated by running the script with the following switch:

.\import_CSV_FS4SP.ps1 -?

Conclusion

This concludes the lab excercises for Building Search Applications in SharePoint Server 2010 for Search and FAST Search Server 2010 for SharePoint: Lesson 3 Importing Keywords, Best Bets & Synonyms.

Page vi