Add, edit, remove and display keywords by using Windows PowerShell (FAST Search Server 2010 for SharePoint)(informazioni in lingua inglese)
Aggiornato: 10 febbraio 2011
Nota
This article describes how to manage keywords by using Windows PowerShell. For information about how to manage keywords by using the graphical user interface (GUI), see Manage FAST Search keywords (Office.com)..
In this article the following Windows PowerShell procedures are described:
Add a keyword
Add multiple keywords
Edit a keyword definition
Remove a keyword
Remove all keywords
Display all keywords and their search settings
Importante: |
---|
When tuning keyword rank by using Windows PowerShell, you associate the different search settings to a search setting group. If you have already added a keyword by using the GUI, the SharePoint front end has automatically created a search setting group. If you have not added a keyword via the GUI, you will have to create a search setting group before you can start doing keyword management. |
Add a keyword
Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.
On the Start menu, click All Programs.
Click Microsoft FAST Search Server 2010 for SharePoint.
Click Microsoft FAST Search Server 2010 for SharePoint shell.
At the Windows PowerShell command prompt, get all search setting groups:
Get-FASTSearchSearchSettingGroup >>Name : 9c65a55f-eafc-451d-b0f5-56fbed465141 >>Description : >>Id : 1 >>LastChanged : 10/19/2010 9:04:46 AM
Add a keyword to the search setting group:
$searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" $searchSettingGroup.Keywords.AddKeyword("<KeywordTerm>")
Where:
<SearchSettingGroupName> is the name of the search setting group.
<KeywordTerm> is the keyword that you want to add.
See also
Get-FASTSearchSearchSettingGroup
New-FASTSearchSearchSettingGroup
Add multiple keywords
Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.
On the Start menu, click All Programs.
Click Microsoft FAST Search Server 2010 for SharePoint.
Click Microsoft FAST Search Server 2010 for SharePoint shell.
At the Windows PowerShell command prompt, create a collection of the keywords that you want to add:
$keywordsToBeAdded = @("<Keyword1>", "<Keyword2>", "<Keyword3>", "<Keyword4>")
Where:
- <Keyword1-4> are the keywords that you want to add.
Get all search setting groups:
Get-FASTSearchSearchSettingGroup >>Name : 9c65a55f-eafc-451d-b0f5-56fbed465141 >>Description : >>Id : 1 >>LastChanged : 10/19/2010 9:04:46 AM
Add the collection of keywords to the search setting group:
$searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" foreach($keywordToBeAdded in "$keywordsToBeAdded") { $searchSettingGroup.Keywords.AddKeyword($keywordToBeAdded)}
Where:
- <SearchSettingGroupName> is the name of an existing search setting group.
See also
Get-FASTSearchSearchSettingGroup
New-FASTSearchSearchSettingGroup
Edit a keyword definition
Nota
A keyword definition is a text that will be displayed under the keyword on the search result page when users search for the keyword.
Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.
On the Start menu, click All Programs.
Click Microsoft FAST Search Server 2010 for SharePoint.
Click Microsoft FAST Search Server 2010 for SharePoint shell.
At the Windows PowerShell command prompt, get all search setting groups:
Get-FASTSearchSearchSettingGroup >>Name : 9c65a55f-eafc-451d-b0f5-56fbed465141 >>Description : >>Id : 1 >>LastChanged : 10/19/2010 9:04:46 AM
Edit a keyword definition in the search setting group:
$searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" $keyword = $searchSettingGroup.Keywords.GetKeyword("<KeywordTerm>") $keyword.Definition = "<NewKeywordDefinition>"
Where:
<SearchSettingGroupName> is the name of an existing search setting group.
<KeywordTerm> is the keyword term to which the definition should be added.
<NewKeywordDefinition> is the new keyword definition string.
See also
Get-FASTSearchSearchSettingGroup
Remove a keyword
Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.
On the Start menu, click All Programs.
Click Microsoft FAST Search Server 2010 for SharePoint.
Click Microsoft FAST Search Server 2010 for SharePoint shell.
At the Windows PowerShell command prompt, get all search setting groups:
Get-FASTSearchSearchSettingGroup >>Name : 9c65a55f-eafc-451d-b0f5-56fbed465141 >>Description : >>Id : 1 >>LastChanged : 10/19/2010 9:04:46 AM
Remove a keyword from the search setting group:
$searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" $searchSettingGroup.Keywords.RemoveKeyword("<KeywordTerm>")
Where:
<SearchSettingGroupName> is the name of an existing search setting group.
<KeywordTerm> is the keyword term of an existing keyword that is to be removed.
See also
Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace
Get-FASTSearchSearchSettingGroup
Remove all keywords
Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.
On the Start menu, click All Programs.
Click Microsoft FAST Search Server 2010 for SharePoint.
Click Microsoft FAST Search Server 2010 for SharePoint shell.
At the Windows PowerShell command prompt, get all search setting groups:
Get-FASTSearchSearchSettingGroup >>Name : 9c65a55f-eafc-451d-b0f5-56fbed465141 >>Description : >>Id : 1 >>LastChanged : 10/19/2010 9:04:46 AM
Remove all keywords from the search setting group:
$searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" $searchSettingGroup.Keywords.Clear()
Where:
- <SearchSettingGroupName> is the name of an existing search setting group.
See also
Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace
Get-FASTSearchSearchSettingGroup
Display all keywords and their search settings
Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.
On the Start menu, click All Programs.
Click Microsoft FAST Search Server 2010 for SharePoint.
Click Microsoft FAST Search Server 2010 for SharePoint shell.
At the Windows PowerShell command prompt, get all search setting groups:
Get-FASTSearchSearchSettingGroup >>Name : 9c65a55f-eafc-451d-b0f5-56fbed465141 >>Description : >>Id : 1 >>LastChanged : 10/19/2010 9:04:46 AM
Display all keywords and their search settings in the search setting group:
$searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" $searchSettingGroup.Keywords
Where:
- <SearchSettingGroupName> is the name of an existing search setting group.
See also
Get-FASTSearchSearchSettingGroup
Cronologia delle modifiche
Data | Descrizione | Motivo |
---|---|---|
10 febbraio 2011 |
2011/02/07 |
Aggiornamento contenuto |