Are you adding columns in a Modern Team site in SharePoint and not seeing your crawled and managed properties generated from them? I bet you are! Read on…
I love building search-driven solutions in SharePoint and I blog about it a lot. It’s a smart, flexible, and scalable technique for surfacing content across your environment. This post is highlighting a current issue I’ve experienced with search. I’ve chosen to write this post not to discourage you from using search, but to ensure you know about the issue as well as the simple workaround until the issue can be resolved.
A little-known yet important issue exists when adding columns to Modern Team Sites if you want to use the crawled and managed properties generated from them in a search web part. The workaround for the issue was originally documented in November 2018 by Trevor Seward in a post, Crawled Properties Not Created From Site Columns in Modern Sites. Based on Trevor’s post, the fix from Microsoft Support has no current ETA and, in fact, is still outstanding as of February 2019. Due to this, I wanted to re-iterate the workaround, particularly because it has direct bearing on a recent post I published titled Expiring News across Modern SharePoint if you chose to build that solution using Option 2 and Modern Team sites instead of Modern Communication sites.
In summary, anywhere you’re wanting to use a Highlighted Content Web Part with a Managed Property filter on a Modern Team site, you will run into a behavior where the crawled and managed properties are NOT being automatically generated in either the tenant or the site collection search schemas.
I believe this issue will eventually be resolved by the Microsoft product team, however in the meantime if you want to build a search-driven solution in Modern SharePoint on any Modern Team site, you need to use this workaround. Once the issue is resolved, I’ll delete this post.
Note: this is not an issue on a Modern Communication site. I’ve only experienced this issue in SharePoint Online on a Modern Team site.
These are the steps I normally take if I want to create a crawled and managed property:
- Create the list or site column on the site
- Add the column to a list/library
- Add some items to the list/library and populate the columns
- Ensure the item has been published if publishing is required for the item
- Wait for search to crawl the item and, in turn, generate the crawled and managed property in the search schema (at EITHER the tenant or site collection)
- [Optionally] Map the crawled property to a Refinable pre-created managed property if you want to filter/sort by the property.
You’ll be waiting a long time for them to appear on a Modern Team site… in fact, they never will!!!
- Manually add your account as a site collection administrator to the site collection you’re adding the column on. Although the Owners group will already be in the Site Collection Administrator group, this is NOT sufficient – you need to be added explicitly to the Site Collection Administrators group.
- Request a re-index of the site by going to Site Settings… Search… Search and offline availability
- Wait for the crawl process to generate the crawled/managed properties in the search schema
- Voila, there they are!
Once the crawled and managed properties are generated, you can either directly use the managed property in the Highlighted Content Web Part OR map the crawled property to a Refinable managed property and use that instead.
Once the managed and crawled properties are created and you have mapped the crawled property to a refinable managed property, you can remove yourself explicitly from the Site Collection Administrators group. Once you do however, my testing has shown you will no longer be able to see the original managed property in the search schema. If you didn’t map the crawled property to a refinable managed property, you will not see the crawled property either.
The Highlighted Content web part will continue to work however so I believe it’s just a UI visibility issue and the crawled/managed properties are in fact still there. It’s up to you whether or not you want to leave an explicit userid in the Site Collection Administrators group on a Modern Team site.
Thanks for reading.