Step by Step configuration to Add custom Refiners in the Refinement Panel of Search Results page for SharePoint Online
You may have custom Library/List columns created which you would like to show them in the Refinement Panel on the Search Results.
Step 1: Creating a Document
Library / List with Customer Columns
- Create a New Document library -> go to Library Settings
- Create a new Column “Product Type” – Choice Field is what I selected.
- Upload some documents to the library and give different Choice options.
4. Go to Library Settings -> Advanced Settings -> Click on ‘ReIndex Document library’ Button.
Step 2: Creating a New Site Collection or Sub Site using “Enterprise Search Center” template. (Note: the reason we need to do this is due to the fact that we
cannot modify the OOB ‘osssearchresults.aspx’ page)
I created a Subsite under my site collection using the ‘Enterprise Search Center’ template. Make sure that you are able to search the documents uploaded.
Step 3: Configuring Managed
Properties for Search
- Logon to Microsoft Online Portal (MOP)
- Go to SharePoint Online Administration Center page.
- On the Left Panel -> Select ‘Search’
- Click ‘Manage Search Schema’
- Search for Existing Managed property ‘RefinableString00’ -> Edit the property and set it up as per below. -> Click 'OK'
Note: By Default in SharePoint Online you cannot create a new Managed Property as ‘Refineable’, due to which we need to use the existing ones and give an Alias for that.
Note: List of Default Existing Refineable Property list.
Step 4:Adding the Managed Property to Refinement Panel on the Search Results Page
- Go to the Subsite Search Center site created in Step 2.
- Type in any keyword to go to the ‘Results.aspx’ page. -> ‘Edit’ that page.
- Edit the Refinement Panel web Part. -> Click on ‘Choose Refiners…’ button.
- From the list of ‘Available Refiners’ -> Select ‘RefinableString00’ -> Click ‘Add’ button.
- Change the ‘Display Name’ for it (Initially it may not show the Sample Values, wait for around 5-10 mins to take effect )
- Click ‘Ok’ -> Save and Close the Page -> Check-In and Publish the Page
Now when you perform the Search for documents in that library, on left Refinement Panel you will see the new Refiner “Product Type”