How can we do this without full crawl ?
As a solution, I create crawl properties using PowerShell prior to the solution deployment. Using the SharePoint solution I create managed properties and map them to crawl properties. Then after sometime, we can run full crawl to finish the process.
I split the article in to two section, to make it clear.
- Step 1 : Create Crawl Properties using PowerShell
- Step 2 : Create Managed Properties and map to Crawl Properties using a feature
1. Get value for property set parameter from existing category. In my case I added the property to SharePoint category
- $searchapp = Get-SPEnterpriseSearchServiceApplication
- $cat = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $searchapp -Identity SharePoint
- Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $searchapp -Category $cat -Limit 1
I got “00130329-0000-0130-c000-000000131346” as the result
2. Determine Crawl Property names
If your site column is ClientName, then the Crawl Property name will be ows_ClientName
3. Create Crawl Property using PowerShell
- New-SPEnterpriseSearchMetadataCrawledProperty -Category SharePoint -IsNameEnum $false -Name "ows_CustomClientName" -PropSet "00130329-0000-0130-c000-000000131346" -SearchApplication $searchapp -VariantType 72
- New-SPEnterpriseSearchMetadataCrawledProperty -Category SharePoint -IsNameEnum $false -Name "ows_CustomProperty" -PropSet "00130329-0000-0130-c000-000000131346" -SearchApplication $searchapp -VariantType 72
- New-SPEnterpriseSearchMetadataCrawledProperty -Category SharePoint -IsNameEnum $false -Name "ows_CustomCountry" -PropSet "00130329-0000-0130-c000-000000131346" -SearchApplication $searchapp -VariantType 72
4. That will create Crawl Properties in Search schema
No comments:
Post a Comment