Add, edit, remove and display keywords by using Windows PowerShell (FAST Search Server 2010 for SharePoint)

 

Applies to: FAST Search Server 2010

Note

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

Important

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

  1. 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.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. 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
    
    
  6. 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

Keyword.Term Property

Get-FASTSearchSearchSettingGroup

New-FASTSearchSearchSettingGroup

Add multiple keywords

  1. 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.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. 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.
  6. Get all search setting groups:

    Get-FASTSearchSearchSettingGroup
    
    >>Name        : 9c65a55f-eafc-451d-b0f5-56fbed465141
    >>Description :
    >>Id          : 1
    >>LastChanged : 10/19/2010 9:04:46 AM
    
    
  7. 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

KeywordCollection Interface

Keyword.Term Property

Get-FASTSearchSearchSettingGroup

New-FASTSearchSearchSettingGroup

Edit a keyword definition

Note

A keyword definition is a text that will be displayed under the keyword on the search result page when users search for the keyword.

  1. 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.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. 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
    
    
  6. 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

Keyword.Definition Property

Get-FASTSearchSearchSettingGroup

Remove a keyword

  1. 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.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. 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
    
    
  6. 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

  1. 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.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. 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
    
    
  6. 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

  1. 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.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. 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
    
    
  6. 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

Keyword.Term Property

Get-FASTSearchSearchSettingGroup