Some time ago, I introduced you to the ability to alter SharePoint search settings in modern SharePoint. There are a few ways to customize search results, and one of the things you can adjust is a Search Vertical. So in today’s post, I would like to explain what a Search Vertical is and how to configure Search Verticals on a SharePoint site.
What is a SharePoint Search Vertical
A search vertical is a subset of search results you get when you search for something in SharePoint. You know, when you search for something on Google and get a bunch of results, you can filter them into different types by clicking on different tabs available under the search box (i.e., News, Images, Videos, etc.)
We have the same capability in SharePoint as well. When you search for something in SharePoint, you get a bunch of results. However, you can also separate them into more relevant categories (Files, Sites, News, Images) by clicking on appropriate tabs. So, for example, if I am searching for a keyword and just want to limit results to files, I will click on the Files tab. If I want only to search for news and announcements, I will click on the News Tab.
To summarize, SharePoint Search Verticals are tabs that allow you to filter results and present results based on some filter/parameter/scope.
Where can you configure SharePoint Search Verticals?
Just as I mentioned in an earlier post, you can configure SharePoint search in two places:
- SharePoint Site
- Tenant (Global) Level
Since the steps for both locations are almost identical, I will demonstrate how to configure SharePoint Search verticals at the site level. So if you are a Site or Team Owner, you can easily follow the below instructions.
To alter SharePoint Search Verticals at the global (tenant) level, you would need to adjust those verticals within the Search & Intelligence Admin Center, and you also need to be a global Microsoft 365 Administrator to do so.
An example of a Search Verticals Customization area within the Global Search & Intelligence Center
How to configure Search Verticals on a SharePoint site
Make sure you are the Site Owner of a given site. If you are a regular site member, you would be unable to customize this.
- On a given SharePoint Site, click Gear Icon > Site Information
- Click View all site settings
- Click Configure search settings under Microsoft Search
- Once you click on the Configure search settings, it will show you the default Microsoft Search Settings page and will default to the Insights page. Click on the Verticals tab to get into the Verticals customization page.
- Once you click on the Verticals Tab, it will show you the default Vertical Tabs available when a user searches for something on a SharePoint site
How to disable the default Search Vertical
By default, it shows the 5 verticals shown above. However, you can disable some of them if necessary. Here is how to achieve this:
- Double-click on a vertical you would like to disable
- Click on the Edit button
- Click on the State toggle to disable the vertical, then click on the Update vertical button
- Click Done
- The table of SharePoint verticals will now display your customizations. For example, in my case, I disabled Sites and Images Verticals.
- It might take 1-2 hours for a change to take place. Here is the end result (all the disabled vertical tabs are gone when the user executes the search at the site level)
Just a note, there are other ways to configure and customize the vertical. For example, you can customize the default vertical by adding a custom filter. I will demonstrate how to do so below, where I provide instructions on creating a custom vertical.
How to create a custom search vertical on a SharePoint site
You might also have a scenario where you would like to create a custom search vertical that will filter for a certain type of results. To take advantage of this capability, you must get familiar with Keyword Query Language and Managed Properties. It can get pretty sophisticated in terms of custom verticals you can create so that I will use a simple example for this demo. I would like to create a custom search vertical that will only show/filter results that are PDF file type and only contain the word “blue” in the file name.
- Navigate to the Microsoft Search Settings screen, as shown earlier in the post
- Click + Add button
- To create a vertical, you must supply several pieces of information. The first one is the name of the Vertical (Tab) you are creating. Give it a name and click Next.
- Next, choose the source of the content. Just click the radio button next to SharePoint, then click Next. There are ways to bring in other, non-SharePoint sources (i.e., 3rd party databases, CRMs, etc.), but this is pretty advanced and is a task for your IT Team. In our case, we will bring content just from SharePoint.
- Next, you need to specify a KQL query that will filter the results to certain ones. Again, I suggest you get familiar with Keyword Query Language (KQL) and managed properties to see what is possible. To help you understand which properties can be used for the KQL query string, it actually lists all the managed properties under the Queryable properties section.
- In my case, the KQL String looks like this: filetype:PDF AND filename:*blue*, which limits results to PDFs and only searches filenames containing the word “Blue.” Click Next.
- On the next screen, you can choose to add an optional filter. It is not mandatory, you can skip this step, but just so that you know which filter we are talking about, it is a filter drop-down that appears under the search results, allowing users to filter results even further.
- If you would like to add an optional filter, click Add a filter
- It will list various properties/managed properties you can filter by. In our case, let’s add LastModifiedTime so users can filter further by the last modified date. Click Next.
- Next, you can add a custom name to the filter above, then click Add
- You can add multiple filters, but in our case, let’s just stick to one. Click Next.
- On the next screen, review the changes you made. Make sure to enable the vertical (it is disabled by default), so click on the State radio button to ensure it says Enabled. Click Create Vertical button.
- You will get a Vertical created Confirmation Message. Click Done.
- This is what the end result will look like in the Verticals configuration screen
- It might take a few hours for the Vertical Tab to appear when you/users execute a search. Here is the end result. You will notice a custom tab created when I do a keyword search. Since we customized our search to only show PDFs and files that contain the word “Blue” – that is precisely what appears when you click on the custom vertical Tab. In addition, we also have the Last Modified Filter as well.
Important Notes about Search Verticals on a SharePoint site
- You cannot delete default verticals/tabs (All, Files, Sites, News, Images); you can only disable them. You can only delete custom (new) verticals/tabs created by you.
- As indicated earlier in this article, you can also create a custom search vertical in Search & Intelligence Admin Center that will impact global search results. But this requires you to be a Microsoft 365 Global Admin role.