Set-SPEnterpriseSearchMetadataMapping

为 Search Service 应用程序设置托管属性映射的属性。

语法

Set-SPEnterpriseSearchMetadataMapping
   [-Identity] <MappingPipeBind>
   [-SearchApplication <SearchServiceApplicationPipeBind>]
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-CrawledProperty <CrawledPropertyPipeBind>]
   [-ManagedProperty <ManagedPropertyPipeBind>]
   [-SiteCollection <Guid>]
   [-Tenant <Guid>]
   [-WhatIf]
   [<CommonParameters>]

说明

This cmdlet updates properties of a managed property mapping. SPEnterpriseSearchMetadataMapping represents a mapping between a managed property and one or more crawled properties in the enterprise search metadata property schema.

有关适用于 SharePoint 产品的 Windows PowerShell 的权限和最新信息,请参阅 SharePoint Server cmdlet

示例

------------------示例------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
## get the crawl property to set to, in this case a new property is created
$cat = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $ssa -Identity People
$cp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Category $cat -Limit 1
$ncp = New-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Name "MyNewCrawlProp" -PropSet $cp.PropSet -Category $cp.CategoryName -IsNameEnum $false -VariantType $cp.VariantType -IsMappedToContents $true
## get the mapping to replace
$mycp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Name MyCrawlProp
$map = Get-SPEnterpriseSearchMetadataMapping -SearchApplication $ssa -ManagedProperty $mp -CrawledProperty $mycp
## set the new crawl property to map to for this mapping
Set-SPEnterpriseSearchMetadataMapping -Identity $map -SearchApplication $ssa -CrawledProperty $ncp

本示例更新托管属性 UserName 与已爬网属性 MyCrawlProp 之间的现有映射 (请参阅 New-SPEnterpriseSearchMetadataMapping 默认搜索服务应用程序的) 。 已爬网属性将由名为 MyNewCrawlProp 的新已爬网属性取代。

参数

-Confirm

执行命令前,看到确认提示。 有关详细信息,请键入以下命令:get-help about_commonparameters

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-CrawledProperty

指定要映射的已爬网属性。

该类型必须是有效的 GUID,格式为 12345678-90ab-cdef-1234-567890bcdefgh、窗体 https://server_name中的有效 URL 或有效的 CrawledProperty 对象的实例。

注意:Null 表示该值未更改。

Type:CrawledPropertyPipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Identity

指定要更新的元数据映射。

该类型必须是有效的 URL、窗体 https://server_name或有效 Mapping 对象的实例。

Type:MappingPipeBind
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-ManagedProperty

指定用于接收已爬网属性映射的托管属性。

键入的值必须是 12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID,托管属性的有效名称(例如 ManagedProperty1)或有效 ManagedProperty 对象的实例。

注意:Null 表示该值未更改。

Type:ManagedPropertyPipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-SearchApplication

指定包含元数据映射的搜索应用程序。

键入的值必须是有效的搜索应用程序名称(例如 SearchApp1)或有效 SearchServiceApplication 对象的实例。

Type:SearchServiceApplicationPipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-SiteCollection

指定返回的元数据映射位于网站集 (SPSite) 范围内。

键入的值必须为用于指定属性集的 12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID。

Type:Guid
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Tenant

指定返回的元数据映射位于租户范围内。

键入的值必须为用于指定属性集的 12345678-90ab-cdef-1234-567890bcdefgh 形式的有效 GUID。

Type:Guid
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-工作分配

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.

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.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition