There could be scenarios where we need to have additional Search Refiners apart from the refiners provided by SharePoint OOTB.
Business Scenario
In this article we are going to take care of a scenario where :
- We need to add one additional property to the User’s Profile with the name “Last Company”. This property will contain the name of the User’s previous organization.
- This property must be mapped with one of the Term Sets created in Managed Term Store.
- This property must be available as an additional Refiner for the People Search.
Prerequisites
- Managed Metadata Service Application Instance must be created & configured.
- User Profile Service Application Instance must be created & configured.
- Search Service Application Instance must be created & configured.
- Content Source must be created for User Profiles. Full crawl must be executed once.
- Search Center Site Collection must be created.
Now let’s see Custom Refiners in action.
Go to Central Administration, then Manage service applications,
Select Managed Metadata Service Application Instance.
SharePoint provides three Terms Sets Department, Job Title, Location which is available OOTB and mapped to User Profile Properties.
Now let’s create a new Term Group “Companies”.
Under “Companies” create a new Term Set “My Past Companies”.
Under “My Past Companies” create new Terms as shown below. Each term should represent a single company that can be selected from within User’s Property Page using “Terms Picker”.
With this we are done with the Managed Term Store Configuration.
Now it is time to create a new User Property “Last Company,” which is mapped to the Term Set “My Past Companies”.
Go to Central Administration, then Manage Service Application,
Select User Profile Service Application Instance,
Go to “Manage User Properties”,
Click “New Property”,
Enter Name, Display Name, Type and Choose Term Set as shown below:
Scroll down and make sure “Default Privacy Setting” must be set to “Everyone” else Search Crawler won’t be able to crawl this property.
Click OK.
This will create a new User Property under Custom Property Section as shown below.
Now Go to “Manage User Profiles” to modify the User Property Page for the User.
Find the User and Edit the profile by selecting “Edit My Profile” from ECB as shown below,
Scroll down and locate the “Last Company” property.
Enter the company name using “Term Picker” as shown below,
Save and Close the User Property Page by clicking the “Save an Close” button.
With this we are all done with the creation and configuration of the Custom User Property.
Now it is time to trigger the Crawl on User Profiles so that this new property gets crawled and available for the search queries.
Go to Central Administration, then Manage Service Application,
Select Search Service Application Instance,
Click on “Content Sources” to open “Manage Content Sources” Page,
Choose “People Search” Content Source and click “Start Full Crawl” using ECB as shown below:
Wait till the Crawl Status is “Idle”.
Go to Search Center and Click on “People” Vertical.
Enter Search Term and Click Find Icon,
As soon as the Search Results appear we can notice a new Refiner “Last Company” available on the Refiner Panel as shown below:
We can easily refine the incoming results by using “Last Company” Refiner as shown below:
By this simple walkthrough we can conclude that the capability of creating new Refiners is quite powerful and gives us enormous power to create different kind of refiners based on the incoming result sets.
I hope this will help someone in need.
Read more articles on SharePoint: