Sharepoint 2013: How To Develop Custom Search Refiners

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 :

  1.  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.
  2.  This property must be mapped with one of the Term Sets created in Managed Term Store.
  3.  This property must be available as an additional Refiner for the People Search

Prerequisites:

  1. Managed Metadata Service Application Instance must be created & configured.
  2.  User Profile Service Application Instance must be created & configured.
  3.  Search Service Application Instance must be created & configured.
  4.  Content Source must be created for User Profiles. Full crawl must be executed once.
  5. Search Center Site Collection must be created.

Now let’s see Custom Refiners in action.

Go to Central Administration = > Manage Service Application

1
Select Managed Metadata Service Application Instance.

2

SharePoint provides three Terms Sets Department, Job Title, Location which is available OOTB and mapped to User Profile Properties.

3

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”.

4

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 = > Manage Service Application

Select User Profile Service Application Instance

5

Go to “Manage User Properties”

6

Click “New Property”

7

Enter Name, Display Name, Type and Choose Term Set as shown below:

8

Scroll down and make sure “Default Privacy Settings” must be set to “Everyone” else Search Crawler won’t be able to crawl this property.

9

Click OK.

This will create a new User Property under Custom Property Section as shown below.

10

Now go to “Manage User Profiles” to modify the User Property Page for the User.

11

Find the User and Edit its profile by selecting “Edit My Profile” from ECB as shown below

12

Scroll down and locate the “Last Company” property.

Enter the company name using “Term Picker” as shown below

13

14

Save and Close the User Property Page by clicking the “Save an Close” button.

15

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 = > Manage Service Application

Select Search Service Application Instance

16

Click on “Content Sources” to open “Manage Content Sources” Page

17

Choose “People Search” Content Source and click “Start Full Crawl” using ECB as shown below:

18

Wait till the Crawl Status is “Idle”.

19

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:

20

We can easily refine the incoming results by using “Last Company” Refiner as shown below:

21

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.

Hope this will help someone in need…

Advertisements

2 thoughts on “Sharepoint 2013: How To Develop Custom Search Refiners

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s