For Sortable:
New-SPEnterpriseSearchMetadataCrawledProperty -Category SharePoint -IsNameEnum $false -Name "ows_MyCrawledProperty" -PropSet 00130329-0000-0130-c000-000000131346 -SearchApplication "Search Service Application" -VariantType 0
New-SPEnterpriseSearchMetadataManagedProperty -Name "MyCrawledProperty" -SearchApplication "Search Service Application" -Type 1 -Queryable $true -Retrievable $true
$cp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication "Search Service Application" "ows_MyCrawledProperty"
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication "Search Service Application" -Identity "MyCrawledProperty"
$mp.sortable= $true
$mp.update
New-SPEnterpriseSearchMetadataMapping -SearchApplication "Search Service Application" -CrawledProperty $cp -ManagedProperty $mp
For Refinable:
New-SPEnterpriseSearchMetadataCrawledProperty -Category SharePoint -IsNameEnum $false -Name "ows_MyCrawledProperty" -PropSet 00130329-0000-0130-c000-000000131346 -SearchApplication "Search Service Application" -VariantType 0
New-SPEnterpriseSearchMetadataManagedProperty -Name "MyCrawledProperty" -SearchApplication "Search Service Application" -Type 1 -Queryable $true -Retrievable $true
$cp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication "Search Service Application" "ows_MyCrawledProperty"
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication "Search Service Application" -Identity "MyCrawledProperty"
$mp.Refinable= $true
$mp.update
New-SPEnterpriseSearchMetadataMapping -SearchApplication "Search Service Application" -CrawledProperty $cp -ManagedProperty $mp
No comments:
Post a Comment