Change the overall- and managed property context weight by using Windows PowerShell (FAST Search Server 2010 for SharePoint)

 

Applies to: FAST Search Server 2010

In this article, the following Windows PowerShell procedures are described:

  • Change the context weight of a managed property

  • Change the overall context component weight

Note

When tuning dynamic rank, we recommend that you create a new rank profile, on which you can test the new component settings. For more on how to create new rank profiles, see Create and manage rank profiles by using Windows PowerShell (FAST Search Server 2010 for SharePoint).

Change the context weight of a managed property

The context component lets you increase rank score for certain managed properties. By for example increasing the context weight for the managed property title, a search word hit in a title will receive a higher rank score than a hit in the body. This causes the item with a search word hit in the title to appear higher up on the search results list. The different managed properties, such as title and body, are mapped into different important levels. The context weight of a managed property is changed in association with the importance level to which it is mapped.

  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, type the following command(s):

    $RankProfile = Get-FASTSearchMetadataRankProfile -Name <RankProfile>
    

    Where:

    • <RankProfile> is the name of the rank profile which is mapped to the full-text index containing the managed property you want to change the context weight of. The default rank profile is named default.
  6. Get the full text index:

    $content = $RankProfile.GetFullTextIndexRanks()|where-Object -filterscript {$_.FullTextIndexReference.Name -eq "content"}
    
  7. Get the managed property:

    $mp = Get-FASTSearchMetadataManagedProperty -Name <ManagedProperty>
    

    Where

    • <ManagedProperty> is the name of the managed property that you want to change the context boost for, for example Title.
  8. Get the importance level for the managed property.

    $mp.GetFullTextIndexMappings()
    
    >> ImportanceLevel: 7
    >> ManagedProperty: Title
    >> FullTextIndex: content
    
  9. View the weight for that importance level:

    $content.GetImportanceLevelWeight(<ImportanceLevel>)
    
    >> 60
    

    Where:

    • <ImportanceLevel> is the importance level of the managed property that you want to change the context boost of, for example 7.
  10. Set the new context weight:

    $content.SetImportanceLevelWeight(<ImportanceLevel>, <ContextWeight>)
    

    Where:

    • <ImportanceLevel> is the importance level for the managed property, for example 7.

    • <ContextWeight> is the context weight you want to assign this managed property, for example 200.

  11. Update the weight:

    $content.Update()
    
  12. Verify that the context weight for the managed property has changed:

    $content.GetImportanceLevelWeight(<ImportanceLevel>)
    
    >> 200
    

    Where:

    • <ImportanceLevel> is the importance level for the managed property that you changed the weight for, for example 7.

See also

Microsoft.SharePoint.Search.Extended.Administration.Schema Namespace

Get-FASTSearchMetadataRankProfile

Get-FASTSearchMetadataFullTextIndex

Get-FASTSearchMetadataManagedProperty

Change the overall context component weight

  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, type the following command(s):

    $RankProfile = Get-FASTSearchMetadataRankProfile -Name <RankProfile>
    

    Where:

    • <RankProfile> is the name of the rank profile that you want to change the overall context component weight of. The default rank profile is named default.
  6. Get the full text index:

    $content = $RankProfile.GetFullTextIndexRanks()|where-Object -filterscript {$_.FullTextIndexReference.Name -eq "content"}
    
  7. Look at the current value:

    $content
    
    >> FullTextIndexReference : content
    >> ProximityWeight: 50
    >> ContextWeight: 50
    
  8. Change the weight:

    $content.ContextWeight = <ContextWeight>
    

    Where:

    • <ContextWeight> is the weight you want to give the overall context component, for example 200.
  9. Update the full text index with the new value:

    $content.Update()
    
  10. Look at the full text index to verify that the new value is being used:

    $content
    
    >> FullTextIndexReference : content
    >> ProximityWeight: 50
    >> ContextWeight: 200
    

See also

FullTextIndexRankComponent.ContextWeight Property

Get-FASTSearchMetadataRankProfile

Get-FASTSearchMetadataFullTextIndex