Set-SPEnterpriseSearchMetadataManagedProperty

 

Applies to: SharePoint Server 2010

Topic Last Modified: 2010-02-11

Sets the properties of a metadata managed property.

Syntax

Set-SPEnterpriseSearchMetadataManagedProperty [-Identity] <ManagedPropertyPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-DefaultForQueryIndependentRank <Nullable>] [-Description <String>] [-EnabledForQueryIndependentRank <Nullable>] [-EnabledForScoping <Nullable>] [-FullTextQueriable <Nullable>] [-IncludeInMd5 <Nullable>] [-Name <String>] [-NameNormalized <Nullable>] [-NoWordBreaker <Nullable>] [-RemoveDuplicates <Nullable>] [-RespectPriority <Nullable>] [-Retrievable <Nullable>] [-SearchApplication <SearchServiceApplicationPipeBind>] [-UserFlags <Nullable>] [-WhatIf [<SwitchParameter>]]

Detailed Description

The Set-SPEnterpriseSearchMetadataManagedProperty cmdlet updates the properties of a managed property. This cmdlet is used typically to change the name or description of a managed property. SPEnterpriseSearchMetadataManagedProperty represents a managed property in the enterprise search metadata property schema.

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Office.Server.Search.Cmdlet.ManagedPropertyPipeBind

Specifies the managed property to update.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a managed property (for example, ManagedProperty1); or an instance of a valid ManagedProperty object.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

Note

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

DefaultForQueryIndependentRank

Optional

System.Nullable

Specifies that the property is mandatory when it is used in query-independent rank (relevance).

Description

Optional

System.String

Adds a description for the new metadata managed property.

The type must be a valid string; for example, a description for a metadata managed property.

EnabledForQueryIndependentRank

Optional

System.Nullable

Specifies that the managed property is mandatory when it is used in the custom ranking model for the query-independent work of ranking.

The type must be one of the following query-independent ranking features in the custom model XML:

  • queryIndependentFeature

  • categoryFeature

  • languageFeature

EnabledForScoping

Optional

System.Nullable

Specifies that the property can be used in a scope definition. The default value is 0.

FullTextQueriable

Optional

System.Nullable

Specifies that the managed property can be used in enterprise search SQL queries.

IncludeInMd5

Optional

System.Nullable

Specifies that the managed property is included in the hash used by the crawler to determine whether a document has changed. The default value is 0.

Name

Optional

System.String

Specifies a name for the managed property.

The type must be a valid managed property name; for example, ManagedProperty1.

NameNormalized

Optional

System.Nullable

Specifies that the managed property has been converted to the full name. The default value is 0.

NoWordBreaker

Optional

System.Nullable

Specifies that the values for this property are processed by a word breaker. The default value is 0.

RemoveDuplicates

Optional

System.Nullable

Specifies that duplicate values for the property are removed. The default value is 1.

RespectPriority

Optional

System.Nullable

Specifies that only one instance of the property exists for an item. The default value is 0.

Retrievable

Optional

System.Nullable

Specifies that the property can be used for advanced search or keyword queries, and that the value for this property can be retrieved in search results.

SearchApplication

Optional

Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind

Specifies the search application that contains the managed property collection.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

UserFlags

Optional

System.Nullable

Reserved for future use.

WhatIf

Optional

System.Management.Automation.SwitchParameter

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Input Types

Return Types

Example

------------------EXAMPLE------------------

$searchapp = Get-SPEnterpriseSearchServiceApplication "SearchApp1"
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $searchapp -Identity testmanagedproperty
$mp | Set-SPEnterpriseSearchMetadataManagedProperty -EnabledForScoping $True

This example enables the managed property to be used in a scope.