SharePoint Online: How to Add a Custom Refiner to Refinement Panel in Search Results?
Requirement: Create Search Refiners in SharePoint Online.
How to add a Custom Column in Search Refiner in SharePoint Online?
The refinement Web Part in the SharePoint Online search results page helps us narrow down the search results, based on specific criteria. By default, SharePoint Online provides several standard refinements, such as Result type, Author, and Modified Date columns. But it is possible to add custom refinements to the refinement panel. In this article, we will explore how to add a custom refiner to the refinement panel in SharePoint Online search results.
In my case, We have a document library with “IC Number” and “Project Name” Columns, which I would like to show in the Refinement Panel on the Search Results. Make sure your document library is already crawled by the search so that we have crawled properties for metadata columns in the document library created. Here are the steps to add a custom refiner to SharePoint Online Search results:
Step 1: Map Crawled Property with Refiner Managed Property:
SharePoint Online search refiners are based on managed properties from the search index. As SharePoint Online doesn’t allow us to create a new Managed Property as “Refineable”, we need to use the “Default unused managed properties” which come with SharePoint Online and map any crawled property with these managed properties to make them as refiners. There is a set of managed properties available for the refinement panel in different data types, E.g., RefinableString00 to RefinableString199.
- Go to SharePoint Online Site Collection >> Settings >> Click on “Search Schema” under site collection administration.
- Search for a managed property either by entering its name to using paging. In my case, I entered “RefinableString05” >> Edit the property (Make sure it’s not mapped with any existing crawled properties)
- Provide an Alias name to the property (This is optional, but helps you to identify the column quickly!)
- Scroll down and under the “Mappings to crawled properties” section, click on the “Add a Mapping” button. In the crawled property popup page, Search for crawled property name. In my case, I entered “ICNumber” and two crawled properties were found: ows_q_USER_ICNumber and ows_ICNumber. Select the one that starts with the “Ows_” prefix.
- Click OK to add Mappings to crawled property field.
You may have to repeat this procedure to map a crawled property to a refinable managed property for all refiners. You can remove/Move existing refiners.
Re-Index the Document Library: Go to Library Settings >> Advanced Settings >> Click on the “ReIndex Document library” button and confirm the prompt.
Step 2: Edit the Search Results page and Add Refiner columns:
The next step is to add the managed property we configured to the search refinement web part. Here is how:
- Go to your Search Center site (I’m assuming you have one created already!)
- Navigate to the search results page by typing any keyword in the search box. In my case, it’s the “Results.aspx” page.
- Click on Settings >> Choose “Edit page”
- Edit the Refinement Panel Web Part by clicking the Web Part Menu, and then click Edit Web Part >> Click on the “Choose Refiners…” button in the web part properties.
- From the list of “Available Refiners,” Select “RefineableString05” (or whatever managed property you mapped in the previous step) and click on the “Add” button.
- Set properties for the refiner such as “Display Name,” etc.
- Click “Ok” on the refiner web part Save and Close the Page
Now, when you perform the search on the left Refinement Panel, you will see new Refiners “Project Name” and “IC Number”.
SharePoint Online Search Refiners Not Showing?
Well, it takes a few hours for the SharePoint Online search engine to Full crawl and index (In my case, it took 6 hours!). Also, You need to have data present in the mapped columns in order to list them in the refinement panel (which is obvious!)
Here is the Microsoft documentation on adding refiners to the refinement panel in SharePoint search results: https://docs.microsoft.com/en-us/SharePoint/search/how-to-add-refiners-to-your-search-results-page
In conclusion, adding a custom refiner to the refinement panel in SharePoint Online can greatly enhance the search experience for your users. By providing additional filtering options, you can help users find the information they need more quickly and easily. Whether you’re a SharePoint administrator or a site owner, adding custom refinements to the refinement panel is a straightforward process that can greatly improve the value of your SharePoint Online investment. With the ability to refine search results based on custom criteria, you can help ensure that your users can find the information they need when they need it.
5 thoughts on “SharePoint Online: How to Add a Custom Refiner to Refinement Panel in Search Results?”
I am attempting this process, but I keep getting this error message: (The settings could not be saved because of an internal error: Bad request while trying to reach endpoint PUT Call to Setting Type Schema, Please try again, SSMS request Id af6474e3-d5a5-810c-aec9-1a001b1f9a9b.)
I waited a few hours and tried again but I keep getting the same message.
Really wish to have a detailed implementation of the same for multi level Taxo and refiners.
It’s a shame this is still not available in Modern SharePoint sites despite modern sites having been around for over 7 years or so… 🙁
Yeah mostly. Good place to start is https://docs.microsoft.com/en-gb/microsoft-365/community/how-do-site-columns-become-managed-properties-thus-available-for-search
Hello. Thanks for the article. Is this solution available for modern pages ?