Crawled vs. Managed Properties in SharePoint Online
Posted on February 2, 2021 | SharePoint
Today I want to talk about a topic that is a bit more technical and advanced than my usual posts. I want to explain to you Crawled vs. Managed Properties in SharePoint. If you love metadata (as I do) and want to use it to build advanced search queries, you need to understand this topic. There is a lot to understand and comprehend here, so this post serves as a stepping stone (introduction) to more advanced articles I plan to write in the future.
Before we discuss crawled and managed properties, we first need to talk about metadata. I blogged quite a bit about it already, as this is one of my favorite topics. Please reference this post for an explanation of what it is.
There are different ways to create metadata columns, but to keep it simple here, for the most basic approach, all you need to do is click that +Add Column button on a list or library and add an appropriate type column. Column types can be different depending on your needs (text, drop-down choice, date field, number, etc.)
For this post, I am creating a drop-down column called Color with the following choices: Red, Green, Blue.
Once you create metadata, upload documents and tag them, the library will look like this:
So far, so good? OK, grab some alcohol now. Trust me, you’ll need it. 🙂 Let’s proceed.
What happens after you upload and tag documents? Well, you now have an extra way to find them as you can easily filter them within a library. However, if you also want to go to any search box and type in “Red” and find that document via a search box, SharePoint needs to “associate” that property you assigned to the file itself. That is where the Crawled Properties come in. After you tag the documents with metadata, SharePoint indexes all of the content and produces a Crawled Property, which maps the file to its metadata. Similar to how Google indexes the content on the Internet and displays my website, for example, when you type in “SharePoint Maven” or various SharePoint-related searches into the Google search box.
Where are Crawled Properties Stored?
Once indexed, Crawled Properties are stored in the Search Schema section of the SharePoint Admin Center. Here is how to access it:
- Office 365 App Launcher > Admin
- Under Admin centers, click on SharePoint
- Click on More features > Open (under Search)
- From the screen that pops up, click Manage Search Schema
- By default, it will show you a list of Managed Properties (that I describe later in this post), so to list all the Crawled Properties, make sure to click Crawled Properties
In our case, for us to find out what happened to our Color Choice Column, let’s type Color into the search box and click the little green arrow button.
And here is our crawled property that got created as a result: ows_Color
In case you are wondering what this naming convention means, I will write a separate post later on the syntax of the crawled and managed properties. But for now, you can reference this article from Microsoft for some information.
- It usually takes 30-60 min after you load and tag documents for the respective crawled properties to appear in the Search Schema
- As of the writing of this post, there is a really annoying bug that exists in SharePoint Online, where crawled properties never appear in the Search Schema, even after a very long time. This only happens on Team Sites connected to Microsoft 365 Groups. Joanne Klein documented the fix to this here. Essentially you have to add your name as a site collection Admin. To do that, navigate to the Team Site where you created metadata and uploaded documents to, then click Gear Icon > Site Permissions., then click on Advanced permissions settings, then click on Site Collection Administratorstype your name into the box and click OK. Then wait 30-60 minutes, and crawled properties shall appear in the Search Schema.
OK, if your thought we were done, I suggest you grab some more alcohol because it gets a bit hairier now. 😊
Once the Crawled Properties have been created, this allows the content to be discoverable by the mighty SharePoint search. However, if you also want, in the future, to utilize this property to build an advanced search or query (i.e., using HCWP Web Part), then you also need to have something called Managed Property to be mapped to that Crawled Property. Think of a Crawled Property as more of a technical, behind the scenes property you cannot do much with, that happens as a result of you creating metadata columns and tagging documents. Managed Property, on the other hand, allows you, the user, to put your hands on it and make sense of it. I know it is a bit abstract at the moment, but jumping ahead (to be covered in greater detail in the future posts), it is a managed property, not a crawled property, that will allow you to query for documents across SharePoint that are tagged with a specific piece of metadata.
Example of a Managed Property used to create a query within HCWP Web Part
Where are Managed Properties Stored?
Managed Properties are stored in Search Schema, just like the Crawled Properties. So use the instructions above to access Search Schema, then, make sure to click on Managed Properties.
Mapping of a Managed Property to a Crawled Property
To take advantage of a crawled property in search queries, like HCWP, it needs to be mapped to a Managed Property. Depending on how you created your metadata column, it might or might not be mapped already. In our case, the Crawled Property ows_Color is not mapped to a Managed Property, because I created it as a local library column and not a site-level one. Again, I will cover all the different scenarios and nuances in later posts.
To add a mapping, you would need to click on a Crawled Property and map to a given Managed Property (there are lots of nuances here, so, again, I will cover the mechanism later on).
Here is how a Crawled Property looks like when mapped to a Managed Property. Managed Properties have syntax of their own, again, here is a good reference for you.
Again, that is all I want to cover in this article. There is a lot to worry about here with all the different column types and syntaxes, so this is something that I will cover in future posts. Stay tuned!
You may also like
How to make the Content Types available on all SharePoint Sites via the Content Type Gallery
June 3rd, 2021
Need SharePoint Help?
Hourly consulting, training and configuration services are availableLearn More