是否有一种方法可以从文件中更新托管属性的映射,我认为必须对已爬网属性进行检查,但是是否存在可以更新映射的功能?谢谢
#$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Identity "Account"
#$prop =Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Name "Basic:11"
#$mapping = Get-SPEnterpriseSearchMetadataMapping -SearchApplication $ssa -ManagedProperty "AccountName"
#Set-SPEnterpriseSearchMetadataMapping -Identity $mapping -SearchApplication $ssa -ManagedProperty "Account" -CrawledProperty $prop
这是我得到的错误
Set-SPEnterpriseSearchMetadataMapping : Cannot convert 'System.Object[]'
to the type
'Microsoft.Office.Server.Search.Cmdlet.MappingPipeBind' required by
parameter 'Identity'. Specified method is not supported.
答案 0 :(得分:0)
看起来像您使用的Get-SPEnterpriseSearchMetadataMapping
返回了一组映射对象。试试
Set-SPEnterpriseSearchMetadataMapping -Identity $mapping[0] -SearchApplication $ssa -ManagedProperty "Account" -CrawledProperty $prop