Skip to content
All articlesSharePoint

SharePoint Metadata Search: How to Search and Filter by Columns

How metadata improves SharePoint search: filter a library by column, set up metadata navigation, search by property and add filters to search results.

4 Dec 202616 min read
SharePoint Metadata Search: How to Search and Filter by Columns

Metadata is the information held in a library's columns, such as a document's customer, status or review date. SharePoint search indexes it along with the file contents, so a file can be found by what its columns say. Inside a library, filter by any column from the column heading or the filter pane. In the search box, search a single property with the form property:value, for example filetype:docx. For a column of your own to become a search property, add it as a site column and let the library be crawled again.

Metadata helps in four places, and each one is set up differently.

Where you searchHow metadata helpsWho sets it up
A library or listFilter by column values and save the result as a viewNothing to set up
A library with metadata navigationA navigation tree and Key Filters built from columnsSomeone with the Manage Lists permission level
The search boxProperty searches such as filetype:docxNothing to set up for built-in properties
The search results pageFilters built on refinable managed propertiesA search or site collection administrator

How search reads a column

Search does not read a column directly. It reads properties. Microsoft describes two kinds.

Microsoft's wording
Crawled properties"The search schema has a list of crawled properties that helps the crawler decide what content and metadata to extract."
Managed properties"Not all crawled content or metadata is useful to have in the search index, so the search schema has a list of useful types of content and metadata, called managed properties."
What is indexed"The index only includes content and metadata from the managed properties."

For a column you create, Microsoft's example of the automatic route is the site column: "Some managed properties are generated automatically. One example is when you add a site column to a SharePoint library or list. When search crawls that list it automatically generates a crawled and a managed property for the site column, and a mapping between them."

So metadata that should be searchable is best created as a site column and then added to the library. What a managed property can do in search depends on its settings.

SettingMicrosoft's wording
Searchable"If you set a managed property to be searchable, the content is added to the index."
QueryableSet a property to be queryable when users should be able to search for items that have one specific value in it, such as one author.
Retrievable"If you want to prevent the content in a managed property from showing up as search results, you can disable the retrievable setting for the managed property."
Refinable"If you want to use a managed property as a refiner on the search results page, use the setting refinable."

Advanced search in SharePoint Online covers the search schema in depth, including the limits on managed properties you create yourself.

Filter a library by its columns

This is the quickest use of metadata and needs no setup. The steps are from Microsoft's filtering article, which covers SharePoint in Microsoft 365 and SharePoint Server.

  1. Select the heading of the column and choose Filter by. Microsoft: "Click on the heading of the column you wish to filter and choose Filter by from the menu options."
  2. In the filter pane, which opens on the right side of the page, choose the values to filter by and select Apply.
  3. Repeat for any other column.
  4. To keep the result, open the Views menu. The current view has an asterisk beside its name, which marks it as unsaved. Select the name, choose Save view as, type a name and select Save. Leave Make this a public view selected if everyone should see it.

The filter pane can also be opened from the filter icon. Microsoft adds two details: "Current filters appear below the title of the list." And: "It is possible to filter your list or library without saving it as a view."

SharePoint views covers views in more detail.

Managed Metadata columns in the filter pane

Terms from a term set get their own treatment in the pane.

  1. Select the filter icon to open the filter pane.
  2. Select the metadata tags to filter on.
  3. If the column has at least five values, select See All to list them.
  4. Tick the tags and select Apply.

For a term set with levels, Microsoft notes: "You can select the Tree View option from the dropdown list at the top of the pane, which provides a hierarchical view of the terms associated with the selected column."

Which columns can be filtered and indexed

Microsoft lists the column types under "Supported and unsupported columns for indexing and filtering".

SupportedNot supported
Single line of textMultiple lines of text
Choice (single value)Choice (multi-valued)
NumberCalculated
CurrencyHyperlink or Picture
Date and TimeCustom Columns
Person or Group (single value)Person or Group (multi-valued)
Managed MetadataExternal data
Yes/No
Lookup

Large libraries need an indexed column

Microsoft: "If you have a large number of list items (exceeding the List View Threshold of 5000 items), you can index existing columns to increase filtering performance."

RuleMicrosoft's wording
Index the first filter"For a view to quickly filter through many items, the first column in the filter must be indexed."
Keep the first result small"The first column of the filter should return fewer items than the List View Threshold."
Example"If you've got 15,000 items, you'll want to have the first index return less than 5,000 items."

SharePoint list view threshold covers the 5,000-item limit and how to add an index.

Metadata navigation and Key Filters

Metadata navigation turns columns into a way of browsing a library. Microsoft: "Metadata navigation enables Microsoft SharePoint users to filter and find content in lists and libraries by using a navigation tree." Its article covers SharePoint in Microsoft 365 and SharePoint Server Subscription Edition, 2019 and 2016.

PartWhat Microsoft says
Navigation tree"The tree displays a hierarchy of folders and managed metadata terms."
Key Filters"You can also apply Key Filters, which work in combination with the navigation tree to refine the list of items that display."
Without a term setMetadata navigation can be set up "even if these lists and libraries do not use managed metadata columns."

Set it up

Microsoft requires at least the Manage Lists permission level.

  1. Open the settings page for the list or library.
  2. Under General Settings, select Metadata navigation settings.
  3. In the Configure Navigation Hierarchies section, select the fields for the tree and select Add.
  4. In the Configure Key Filters section, select the fields to use as Key Filters and select Add.
  5. Leave Automatically manage column indices on this list selected. Microsoft recommends it.
  6. Select OK.

Microsoft notes: "By default, metadata navigation and filtering is enabled in most sites." If the option is missing: "If you don't see the Metadata navigation settings option, it might be disabled on your site." A site owner or site collection administrator can switch it on: in Site settings, under Site Actions, select Manage site features, find Metadata Navigation and Filtering and select Activate.

Which columns can be used

UseColumn types Microsoft lists
Navigation hierarchyManaged Metadata, and "some column types as fields in a metadata navigation hierarchy, such as Content Type and Single-value Choice."
Key FiltersManaged Metadata, Content Type, Choice, Person or Group, Date and Time, Number

The indexes are created for you. Microsoft: "Single column indexes are created on all supported Key Filter fields except for the Content Type and Choice fields." A list can have 20 indexes. If the fields you choose need more, Microsoft says to disable automatic indexing and configure the indexes manually.

A property search limits a query to one property. Microsoft's syntax is the property name, an operator and a value, written together.

QueryWhat Microsoft says it returns
author:"John Smith""Returns content items authored by John Smith."
filetype:docx"Returns Microsoft Word documents."
filename:budget.xlsx"Returns content items with the file name budget.xlsx."
OperatorMicrosoft's description
:Returns results where the value is equal to the property value, or matches individual terms in it
="Returns search results where the property value is equal to the value specified in the property restriction."
<"Returns results where the property value is less than the value specified in the property restriction."
>"Returns search results where the property value is greater than the value specified in the property restriction."
<="Returns search results where the property value is less than or equal to the value specified in the property restriction."
>="Returns search results where the property value is greater than or equal to the value specified in the property restriction."
<>"Returns search results where the property value does not equal the value specified in the property restriction."
.."Returns search results where the property value falls within the range specified in the property restriction."

Two rules decide whether a property search works:

  • No spaces. "The property restriction must not include white space between the property name, property operator, and the property value, or the property restriction is treated as a free-text query."
  • The property has to be queryable. "The managed property must be Queryable so that you can search for that managed property in a document."

For a column of your own, the name to type is the managed property name, which is listed in the search schema: in Site settings, under Site Collection Administration, select Search Schema. Microsoft adds: "Auto-generated managed properties are case-sensitive."

Filters on the search results page

Filters are the choices people use to narrow a set of results. Microsoft: "Filters allow users to refine the results of their queries and display the refined results." They are built on one kind of property: "Refinable managed properties are used to configure filters in the vertical administration wizard."

Making a column into a filter takes three steps: map it to a refinable property, re-index, then add the filter.

1. Map the column to a refinable managed property

SharePoint in Microsoft 365 comes with unused refinable properties for this. Microsoft: "Refinable Managed Properties cannot be created. Instead use the existing Refinable Managed Properties, for example, RefinableString00 or RefinableInt00."

  1. On the site, select Settings, then Site settings. If you don't see it, select Site information, then View all site settings.
  2. Under Site Collection Administration, select Search Schema.
  3. On the Managed Properties page, find an unused managed property that is marked with Refine.
  4. Point to it, select the arrow, and select Edit/Map property.
  5. Under Main characteristics, in the Alias box, enter a name for the property.
  6. In the Mappings to crawled properties section, select Add a mapping.
  7. Select the crawled property for your column and select OK.
  8. Select OK.

Microsoft defines unused this way: "By unused, we mean that the property is not mapped to a crawled property: the Mapped Crawled Properties column is empty."

2. Re-index

See the next section. The mapping does nothing until the content has been crawled again.

3. Add the filter to a search vertical

For one site:

  1. Open the settings panel from the gear, select Site information, then View all site settings.
  2. In the Microsoft Search section, select Configure search settings.
  3. Under Microsoft Search, go to custom experience and select Verticals.
  4. Select the vertical and select Edit.
  5. Go to the filters step and select Add a Filter.
  6. Review and save the vertical.

For the whole organization, the same wizard is under Verticals in the Microsoft 365 admin center.

LimitMicrosoft's wording
Property types"Filters are configurable on the text and dateTime properties."
Values shown"A filter shows a maximum of 50 values in the drop-down."
Order"The order of out-of-the-box filters cannot be adjusted."

The Refinable setting in the search schema is a separate thing. Microsoft says of it: "This setting is only available on the built-in managed properties, and only affects the classic search experience."

Re-index after changing columns or the schema

Microsoft: "When you change managed properties or add new ones, the changes take effect only after the content is re-crawled." A single library can be re-indexed on request.

  1. Go to the list or library.
  2. Select Settings, then Library settings or List settings.
  3. Under General Settings, select Advanced settings.
  4. Scroll to Reindex Document Library or Reindex List and select the button. A warning appears. Select the button again to confirm.

Microsoft: "The content is reindexed during the next scheduled crawl." A whole site can be re-indexed too, with a caution: "Reindexing a site can cause a massive load on the search system. Don't reindex your site unless you've made changes that require all items to be reindexed."

SharePoint search results missing covers the other reasons an item is not found.

Which metadata to add

Microsoft on why consistent metadata matters: "When the content across sites in an organization has consistent metadata, it is easier to find and access business information and data by using search."

GoalMetadata to use
Filter one library by a short, fixed set of valuesA single-value Choice column
The same tags on many sites, with levelsA Managed Metadata column, which gets the tree view in the filter pane
Tell kinds of document apart in one libraryContent types, which also work as a Key Filter
Search for a value from the search boxA site column, so a managed property is generated for it
A filter on the search results pageA site column mapped to an unused refinable managed property
Fast filtering in a library over 5,000 itemsAn indexed column as the first filter

SharePoint lookup column compares Choice, lookup and Managed Metadata columns.

Frequently asked questions

Does SharePoint search use metadata?

Yes. Search extracts content and metadata from each item as crawled properties, and the index includes the content and metadata from managed properties. A file can be found by its column values as well as by its text.

How do I search SharePoint by a column value?

In the search box, type the managed property name, a colon and the value with no spaces, such as filetype:docx. The managed property has to be queryable. For a column of your own, add it as a site column so that search generates a managed property for it.

How do I filter a document library by metadata?

Select the heading of the column and choose Filter by, pick the values in the filter pane and select Apply. To keep the result, open the Views menu and choose Save view as.

What is metadata navigation in SharePoint?

Microsoft describes it as a way to filter and find content in lists and libraries by using a navigation tree. The tree shows a hierarchy of folders and managed metadata terms, and Key Filters refine the list further.

Changes take effect only after the content is crawled again. Re-index the library from Advanced settings, and create the column as a site column, which is the case Microsoft gives for automatically generated managed properties.

Which columns cannot be used for filtering and indexing?

Microsoft lists Multiple lines of text, multi-valued Choice, Calculated, Hyperlink or Picture, Custom Columns, multi-valued Person or Group and External data as not supported.

How do I add a custom filter to SharePoint search results?

Map the column's crawled property to an unused refinable managed property in the search schema, re-index the content, then add a filter on that property to a vertical in the Microsoft Search settings.

What is a Key Filter?

A Key Filter is a column chosen in the metadata navigation settings that people can filter by alongside the navigation tree. Microsoft lists Managed Metadata, Content Type, Choice, Person or Group, Date and Time and Number columns as usable.

What is the difference between a crawled property and a managed property?

A crawled property is content or metadata the crawler extracts from an item. A managed property is one the search schema keeps in the index. A managed property has to be mapped to a crawled property to get content into the index.

How many filter values can a search filter show?

Microsoft states that a filter shows a maximum of 50 values in the drop-down, and that filters can be configured on text and dateTime properties.

About the author
Mark Smith - Co-Founder, SmiKar Software

Mark Smith co-founded SmiKar Software in 2015 and has spent the past decade helping organisations solve Microsoft 365 data management challenges. He works with the SmiKar team to build solutions for SharePoint archiving, storage optimisation, governance and compliance, supporting customers from growing businesses through to Fortune 500 enterprises.

More about SmiKar

Ready when you are

Cut your Microsoft 365 storage bill - keep your data in your tenant.