In an earlier post here we have seen how we can set Property Bag values in Modern SharePoint sites. One of the major reasons for setting Property Bag values in SharePoint sites is to make the SharePoint sites searchable based on custom metadata.
However, property bag values are not crawled by the SharePoint Online Search index directly. To make a property bag value searchable, we must explicit set the property bag values to be indexed by the Search crawler. To do this, we simply set the Property bag values to indexed using the SharePoint PnP PowerShell.

The “-Indexed” attribute of the Set-PnPPropertyBagValue cmdlet makes an entry in a hidden system property bag value vti_indexedpropertykeys which then makes these property bag values searchable. A screenshot of the result is below.
SetPnPPropertyBagIndexed.png
After performing the above, we flag the site to be reindexed so that the SharePoint search crawler will pick up the new Property Bag values in the next crawl. This can be done from “Site Settings -> Search and offline availability” (in the Search group), then click the button “Reindex site” (screenshot below).
Note: Since SharePoint Online is a massive SaaS system, it can take up to 24 hours for the crawler to pick up this property.  Unfortunately, there’s no workaround for this delay, you simply must be patient.
Search and Offline Availability
Conclusion
In the above post we saw how we can enable Property Bag values to be searchable.
 

Category:
Application Development and Integration, Communication and Collaboration, Office 365, PowerShell, SharePoint
Tags:
, , ,

Join the conversation! 1 Comment

  1. Hi, do you know if this works for modern sites (Team and CommunicationSites) as well? It seems that properties will not be indexed?
    Regards

Comments are closed.