Change the weight, remove or add a static rank component 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 weight of a static rank component

  • Remove a static rank component

  • Add a static rank component

Note

When tuning static 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 weight of a static rank component

  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 contains the component that you want to configure. The default rank profile is named default.
  6. Get all the static rank components:

    $QualityComponents = $RankProfile.GetQualityComponents()
    
  7. Look at the current values:

    $QualityComponents 
    
    >> ManagedPropertyReference : hwboost
    >> Weight                   : 0
    >> ManagedPropertyReference : docrank
    >> Weight                   : 70
    >> ManagedPropertyReference : siterank
    >> Weight                   : 100
    >> ManagedPropertyReference : urldepthrank
    >> Weight                   : 100
    
  8. Set the new weight value:

    $QualityComponents | where-object -filterscript { if ( $_.ManagedProperty
    Reference.Name -eq "<QualityRankComponent>" ) { $_.Weight=<RelativeWeight>; $_.Update() } }
    

    Where:

    • <QualityRankComponent> is the name of the static rank component to which you want to change the weight, for example urldepthrank.

    • <RelativeWeight> is the new weight you want to give the static rank component, for example 200.

  9. Check that the weight was changed:

    $QualityComponents
    
    >> ManagedPropertyReference : hwboost
    >> Weight                   : 0
    >> ManagedPropertyReference : docrank
    >> Weight                   : 70
    >> ManagedPropertyReference : siterank
    >> Weight                   : 100
    >> ManagedPropertyReference : urldepthrank
    >> Weight                   : 200
    

See also

QualityComponent.Weight Property

Get-FASTSearchMetadataRankProfile

Remove a static rank component

To remove a static rank component, either set the static component weight = 0, or remove the component from the rank profile. Since the previous example can also be used to set the weight = 0, the following example shows how to remove a static rank component.

  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 contains the component that you want to remove. The default rank profile is named default.
  6. Get all the static rank components:

    $QualityComponents = $RankProfile.GetQualityComponents()
    
  7. Look at the current components:

    $QualityComponents 
    
    >> ManagedPropertyReference : hwboost
    >> Weight                   : 0
    >> ManagedPropertyReference : docrank
    >> Weight                   : 70
    >> ManagedPropertyReference : siterank
    >> Weight                   : 100
    >> ManagedPropertyReference : urldepthrank
    >> Weight                   : 100
    
  8. Loop over the components and remove the component that you want to exclude from static rank when found:

    $QualityComponents | where-object -filterscript { if ( $_.ManagedProperty
    Reference.Name -eq "<QualityRankComponent>" ) { $_.Delete() } }
    

    Where:

    • <QualityRankComponent> is the name of the static rank component that you want to remove, for example urldepthrank.
  9. Verify that the static rank component was removed:

    $QualityComponents
    
    >> ManagedPropertyReference : hwboost
    >> Weight                   : 0
    >> ManagedPropertyReference : docrank
    >> Weight                   : 70
    >> ManagedPropertyReference : siterank
    >> Weight                   : 100
    

See also

QualityComponent.Delete Method

Get-FASTSearchMetadataRankProfile

Add a static rank component

Any managed property that is defined as an integer can be used as input to the static rank. The weight of the new static rank component should be set depending on the scale used in that managed property. For example, using a static component weight of 200 will give rank points equal to double of the integer value of the managed property. Using a static component weight of 1000 will give rank points equal to 10 times the integer value of the managed property.

  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:

    $RankProfile = Get-FASTSearchMetadataRankProfile -Name <RankProfile>
    

    Where:

    • <RankProfile> is the name of the rank profile that you want to add the component to. The default rank profile is named default.
  6. Get all the static rank components:

    $QualityComponents = $RankProfile.GetQualityComponents()
    
  7. Look at the current components:

    $QualityComponents 
    
    >> ManagedPropertyReference : hwboost
    >> Weight                   : 0
    >> ManagedPropertyReference : docrank
    >> Weight                   : 70
    >> ManagedPropertyReference : siterank
    >> Weight                   : 100
    >> ManagedPropertyReference : urldepthrank
    >> Weight                   : 100
    
  8. Get the managed property that you want to add as a static rank component:

    $ManagedProperty = Get-FASTSearchMetadataManagedProperty -Name <ManagedProperty>
    

    Where:

    • <ManagedProperty> is the name of the managed property that you want to add as a static rank component, for example rating.
  9. Add the managed property to the list of static rank components:

    $QualityComponents.Create($ManagedProperty, <RelativeWeight>)
    

    Where:

    • <RelativeWeight> is the relative weight you want to give the new component, for example 200.
  10. Verify that the managed property was added:

    $QualityComponents 
    
    >> ManagedPropertyReference : rating
    >> Weight                   : 200
    >> ManagedPropertyReference : hwboost
    >> Weight                   : 0
    >> ManagedPropertyReference : docrank
    >> Weight                   : 70
    >> ManagedPropertyReference : siterank
    >> Weight                   : 100
    >> ManagedPropertyReference : urldepthrank
    >> Weight                   : 100
    

See also

QualityComponentCollection.Create Method

Get-FASTSearchMetadataRankProfile