Using site columns to create searchable metadata in SharePoint Online (Office 365)

A SharePoint site column[1] is a field definition that defines data or metadata that can be associated with items in a list or documents in a document library[2], and is a widely used technique in customizing SharePoint.  This article will review how site columns can be used in SharePoint Online, both in adding custom metadata values to Microsoft Word or other Office documents, and also using this property do a fielded search.   We conclude with the steps to configure the site column term as a refiner on the search results page.

To investigate this functionality we'll consider a hypothetical requirement to mark each document stored in a site's document library with a Color label, choosing from one of a small set of values.  We begin by creating a site column in our Office 365 SharePoint site[3] from the Site Settings page of the site collection, and add it to the group Custom Columns.  By selecting data type Choice, we can list the explicitly allowed values of either Red, Yellow, Green or Blue.

The Description section provides an opportunity to provide an explanation of what this field is to be used for, and whatever text is added here will be shown in the document upload form to help the users make an appropriate choice of value.

It is then added to the site's shared document library as a default column, via the Library Settings interface on the Library tab of the document library, by clicking the "Add from existing site columns" option.

If we then upload an existing word document to this library, the form will prompt for this new property, and supply the default value that was specified when the site column was created.

The next interesting case is to create a Word 2016 document with this metadata setting as a built-in custom property, to verify that it would be recognized during the upload to SharePoint Online and mapped to the existing site column.  Adding a custom property to a document is described in the support pages [4], and won't be spelled out here.  For our testing we created a custom property named Color of type Text in a Word document (via the Advanced Properties, Custom tab), and gave it a non-default value matching a one of the choices created in the SPO site column.  The SharePoint Online upload process did successfully read this value from the Word 2016 document, and displayed it as the default value in the upload form.


A SharePoint Online site crawl generally picks up new content within a short period of time, so after some interval the document should be returned in search results for an appropriate query.  Site column fields will be picked up in the crawl as a Crawled Property and mapped to a Managed Property[5], with both of them created automatically as necessary.  More details on how the automatically created crawled and managed property names are determined have been documented in a blog post[6], and in this specific case the property names, incorporating the field name and data type of the site column, would be:

Crawled Property Managed Property
ows_q_CHCS_Color ColorOWSCHCS

On the SharePoint Online site a search for ColorOWSCHCS:Red returned the test documents uploaded with that setting, but not others with value “Yellow”.

While having this automatically created Managed Property available is helpful, it is not particularly user-friendly and  lacks the full support of a custom created Managed Property, in particular the ability to use it as a refiner.  In SharePoint Online this can be configured via the tenant's Search Schema interface by modifying one of the numerous unused predefined Managed Properties[7], giving it a user-friendly Alias matching the document property name.  In this case, we'll utilize the RefinableString00 property, giving it the Alias value Color, and map the automatically created ows_q_CHCS_Color crawled property to it.

This customization improves the metadata search experience, as shown below, and will also enable its use as a refiner in the query results.

Customization of the search results page is done by first choosing "Edit Page" from the Settings cog , then selecting Edit Web Part from the pulldown in the Refinement web part on the left side of the page in the Navigation Zone.

By clicking the "Choose Refiners" button on the resulting Properties menu, the RefinableString00 refiner is added to the "Selected Refiners" list, and given the display name Color.

After using the "Move Up" button to put this new navigator at the top of the "Selected Refiners" list in the Refinement web part, the Color refiners are displayed for search results and available to filter the results to the appropriate selection.

While the focus of this article has been on customization of SharePoint Online, the techniques described here are also  available in on-premises SharePoint installations.  For further background on aligning document properties and SharePoint columns, see the blog "Document Property Promotion and Demotion Overview and Considerations" [8].


[1] "Building Block: Columns and Field Types" -

[2] "Introduction to Columns" general SharePoint overview -

[3] SharePoint Online "Create a site column" -

[4] "View or change the properties for an Office 2016 file" -

[5] "Manage the search schema in SharePoint Online" -

[6] "From site column to managed property – What's up with that?" -

[7] "Create a managed property by renaming an existing one" -

[8] "Document Property Promotion and Demotion Overview and Considerations" -