Asked by:
Crawled Properties not shown via PowerShell
-
Hi,
Using the 2016 RTM Trial in multi-tenancy setup.
I've successfully crawled content of a tenant containing custom content type and few custom fields, and can see my custom fields in the Crawled Properties on the tenant admin site. However, I cannot see any of these crawled properties using PowerShell command
Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $searchapp -Tenant $sub.Id
where $searchapp is the name of the Search Application and $sub.Id is the GUID of the Tenant Subscription Id.
I can get all default SharePoint crawled properties with that command but not my custom ones.
Search Application is partitioned, and I cannot see my custom fields in crawled properties of the main Central Admin site.
PS> $searchapp.Properties | select * IsReadOnly : False IsFixedSize : False IsSynchronized : False Keys : {Microsoft.Office.Server.Utilities.SPPartitionOptions} Values : {UniquePartitionPerSubscription} SyncRoot : System.Object Count : 1Have tried all possible combinations I can think of, e.g., use -SIteCollection parameter instead of -Tenant (and both), still nothing.
Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $searchapp -SiteCollection "252e89ed-dc36-41ac-82f2-6a227d8bd245" | Where {$_.Name -like "*misource*"} | select NameI was able to create Managed Properties using PowerShell, but needed to do the mapping manually on tenant admin site due to this issue.
This used to work fine on SP2013, so am I perhaps missing something SP2016 specific?
- Edited by Jussi Palo Wednesday, April 6, 2016 7:16 PM
Question
All replies
-
-
-
Hi
For crawler to crawl a custom field and convert it into a managed property there should be at least one list item or one document with that data against that column.
Refer below article for more information
https://ahmedmuneeb1.wordpress.com/2013/12/15/sp2013-custom-field-not-showing-in-search/
http://sadomovalex.blogspot.ae/2013/09/problem-with-not-crawled-managed.html
Karim... Please remember to mark your question as answered, if this solves your problem.
-
-
This issue seems to persist even in June 2016 CU for SharePoint 2016.
Any idea why/how to get this working using PS? Would like to use my scripts for this final state of tenant installation without having to manually do this.
Issue is somehow related to SchemaId, that is first queried in SQL with
exec proc_MSS_GetSchemaIdByTenant @TenantId='49352E44-72CA-4E8F-8AB2-513CB8A2B621'
@TenantId is valid TenantId in this case, but this query returns nothing, leading to that the following query to get the crawled properties withing SharePoint group using 0 as SchemaId like:
exec dbo.proc_MSS_GetCrawledPropertiesAllForCategory @CategoryName=N'SharePoint',@SchemaId=0
And this doesn't return any custom crawled properties in a NEWLY (yesterday) created tenant I just realized (I do see all custom crawled properties via browser on tenant admin site, however). On one older tenant, I do see crawled properties both via browser and via PS, but it also had same issue for several days. Can't figure out why it started working...
- Marked as answer by Jussi Palo Wednesday, June 15, 2016 9:19 AM
- Unmarked as answer by Jussi Palo Thursday, July 21, 2016 6:14 AM
- Edited by Jussi Palo Thursday, July 21, 2016 7:07 AM
-
-
-
-
The microsoft support says the problem is known.
The only solution is momentarily to recreate the managed property:
Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue $searchApplication = Get-SPEnterpriseSearchServiceApplication $category = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $searchApplication -Identity "SharePoint" $managedProperty = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $searchApplication -Identity "MyManagedPropertyName" -ErrorAction SilentlyContinue $crawledProperty = New-SPEnterpriseSearchMetadataCrawledProperty -Name "ows_MyManagedPropertyName" -PropSet ed280121-b677-4e2a-8fbc-0d9e2325b0a2 -SearchApplication $searchApplication -Category $category -IsNameEnum $false -VariantType 31 New-SPEnterpriseSearchMetadataMapping ` -SearchApplication $searchApplication ` -CrawledProperty $crawledProperty ` -ManagedProperty $managedPropertyThis will also delete all existing mappings of this property. Therefore you have to check if the property can be found using the old method and otherwise recreate it.
Let's hope this will be fixed soon...
The correct propset can be found in this article:
http://sharepoint.stackexchange.com/questions/76907/what-is-propset-in-crawled-property
158d7563-aeff-4dbf-bf16-4a1445f0366c - TaxonomyField
fea84df6-a0fc-492c-9aa7-d28b8dcb08b3 - SPFieldMultiLineText, HtmlField, ImageField, LinkField
ed280121-b677-4e2a-8fbc-0d9e2325b0a2 - SPFieldText, SPFieldChoice, SPFieldMultiChoice, SPFieldNumber, SPFieldCurrency, SPFieldDateTime, SPFieldBoolean, SPFieldUser, SPFieldUrl, SPFieldGuid
00130329-0000-0130-c000-000000131346 - other field types
- Edited by MrTantum Tuesday, November 22, 2016 12:35 PM
-
Hi,
Any feedback on this issue?
We have a SharePoint 2016 farm with August 2016 CU and still doesn't work.
Robi MCT Kompas Xnet d.o.o. Ljubljana | blog: http://xblogs.kompas-xnet.si | website: http://www.kompas-xnet.si
Slovenia
Please vote if you find reply useful or mark it as answer.
Thank you- Edited by R0ber7oMVP Tuesday, March 21, 2017 2:10 PM
-
-
As discussed with Microsoft,
This is a change by design. Now Custom Crawl Properties and Custom managed Properties are saved in Search index instead of Search Schema database. That is why this command is not able to get these custom crawl properties.
As a work around for this -
You will need to create a custom crawl/managed properties using power shell in order to save them in Search Schema database. only then power shell commands will be able to get those properties.
Thanks and Regards,
Abhinav Agarwal
Abhinav Agarwal