Create a crawlable property in SharePoint Online
To get CDM to respond efficiently to the locking or unlocking of a SharePoint site, you can enable custom metadata to be searchable in SharePoint Online by creating a crawlable and managed property. The following steps provide step-by-step instructions about how to do this:
-
Create a temporary SharePoint communication site with a custom list
-
Enable the crawled property to be searchable, queryable, and retrievable
Before you begin, please ensure you’ve logged in to the Microsoft 365 admin center.
Create a temporary SharePoint communication site with a custom list
You’ll need to set up a temporary SharePoint communication site with a custom list by adding a new column with the property name you want to crawl. In this case, that would be IAMCDMLockedState along with a sample value.
-
Select + Create on the Active sites page to create a temporary SharePoint communication site.
-
Select Communication site from the Create a site pane.
-
Select Standard communication from the Select a template pane.
-
Select Use template from the Preview and use ‘Standard communication’ template pane.
-
Do the following on the Give your site a name pane and then select Next:
-
Enter IAMCDMDummySite as the name for your site.
-
Optionally, enter a description for your site.
-
Start typing your name in the Site Owner box and select your signed-in Microsoft 365 admin account from the list.
-
Leave all the settings on the Set language and other options pane as default and select Create site.
-
Use the Search sites box on the Active sites page to find the site you’ve created, then select its URL to open it in a new browser tab.
-
Select + New and then List from the homepage of your site.
-
Select List under Create from blank from the How would you like to start? pane.
-
Enter IAMCDMDummyList as the name for your list, and ensure Show list in site navigation is selected.
-
Select Create to load the list on the IAMCDMDummySite page.
-
Select + Add column to display the Create a column pane, then select Text, followed by Next.
-
Do the following on the Create a column blade and then select Save.
-
Enter IAMCDMLockedState as the name for the column.
-
Optionally, enter a description for the column.
-
Select Single line of text from the Type list.
-
Leave all the other settings as default and select Save.
-
Select + Add new item to display the New item pane.
-
Do the following on the New item pane and then select Save:
-
Type 1 in the Title box.
-
Type Locked in the IAMCDMLockedState box.
You’ve created a temporary SharePoint communication site and added a custom list with the property name you want to crawl. You’ll now need to enable SharePoint search to discover the new column.
Enable SharePoint search to discover the new column
After creating a temporary SharePoint communication site and adding a custom list with the property name you want to crawl, the next step is to trigger a reindex of your communication site to ensure SharePoint search can discover the new column and its data.
-
Select Site information to open the Site Information blade.
-
Select View all site settings from the Site Information blade. The Site Settings page appears.
-
Select Search and offline availability under Search to display the Search and Offline Availability page.
-
Select the Reindex site button to display the Reindex site pane.
-
Do the following on the Reindex site pane and then select Reindex site.
-
Select the check box to acknowledge and agree to the statement on this pane.
-
Select There has been a change in the search schema from the list.
-
Select OK on the Search and Offline Availability page.
The crawling schedule may take up to 60 minutes to reindex your temporary SharePoint communication site.
You’ve successfully triggered a reindex of your communication site so SharePoint search can discover the new column and its data. Next, create a managed property with the same name in the SharePoint search schema, map it to the crawled property, and enable it to be searchable, queryable, and retrievable.
Enable the crawled property to be searchable, queryable, and retrievable
After triggering a reindex of your communication site, the last step is to create a managed property with the same name in the SharePoint search schema, map it to the crawled property, and enable it to be searchable, queryable, and retrievable.
-
Select More features from the Navigation menu on the SharePoint admin center. The More features page appears.
-
Select Open under Search to display the Search Administration page.
-
Select Manage Search Schema to display the Managed Properties page.
-
Select New Managed Property, and do the following:
-
Type IAMCDMLockedState in the Property name box.
-
Select the Text option for Type.
-
Under Main characteristics, select the Searchable, Queryable, and Retrievable check boxes and leave all other settings as default.
-
Under Mappings to crawled properties, select Add a Mapping to display the crawled property selection pane.
-
Type OWS_IAMCDMLockedState in the Search for a crawled property name box, then select Find.
It may take time for this property to appear in the Select a crawled property list. If you can’t find it after selecting Find in the Search for a crawled property name box, please try again later.
-
Select ows_IAMCDMLockedState from the Select a crawled property list, then select OK to close the crawled property selection pane.
-
Select OK on the Managed Properties page.
You will notice that the IAMCDMLockedState (the property name) is linked to OWS_IAMCDMLOCKEDSTATE (mapped crawled property).
This completes the process of creating a crawlable SharePoint property. Once indexing is complete, which usually takes an hour, this property will be available for use in search queries and integrations.