Allow SharePoint 2010 People Search to search SharePoint User Profile Custom Property


Moses
SharePoint Consultant
Published On :   29 May 2013
Visit Count
Today :  5    Total :   19104



This article would help in enabling SharePoint 2010 Search feature to handshake with SharePoint User Profile Custom Properties.

Using SharePoint 2010 to search the default properties of User Profile is straight forward. The critical stage would be making the SharePoint User Profile Synchronization work. There are plenty of articles on User Profile Synchronization and it is out-of-scope for the current article.

To enable default people search, start the User Profile Service and do a crawl. But this would enable the search for default properties of User Profile & not the user created Custom Properties.

We’ll move a step forward & show how a user created Custom Properties can be brought in to SharePoint search gambit.

To start with, let’s create a custom property named ‘CustomAttrib’ in our SharePoint User Profile. Add value to ‘CustomAttrib’ in User Profile and see the results in People Search.

 

Create Custom Property in User Profile

  • In SP Central Administration page, click on Manage Service Application

Manage Service Application

  • Click on User Profile Service Application. If it is not found, we can create by clicking on ‘New’ menu on the top navigation & selecting User Profile Service Application

User Profile Service Application

  • Click on Manage User Properties

Manage User Properties

  • Click on New Property

New Property

  • Type Custom Property name

Custom Property Name

  • Make sure Indexed checkbox is checked

Indexed Checkbox

With this we have added ‘CustomAttrib’ as a Custom Property in User Profile. Lets add some value to the added Custom Property, as otherwise, it might get slipped from search crawl.

  • In User Profile Service Application page, click on Manage User Profile

Manage User Profile

  • Search for a user by typing a existing user in Find Profiles textbox. In the result grid, select Edit My Profile from the ECB menu and type a value in ‘CustomAttrib’ Custom Property

Find Profiles

 

Map Custom Property in SharePoint Search Metadata Properties

  • In Search Service Application page, click on Metadata Properties

Metadata Properties

  • Invoke crawl to have the newly added Custom Properties displayed in Crawled Properties

Invoke Crawl

  • Click on the Crawled Properties in Metadata Properties page. Do this after the crawl is completed in the previous step

Crawled Properties

  • Type the Custom Properties name (customattrib) in the search box to check if the custom property is crawled

Search Crawled Properties

  • Create a New Managed Properties to map the Crawled Custom Property. Click on the New Managed Property in the Metadata Properties page and fill the Property Name & do the mapping by clicking on Add Mapping and selecting the newly added User Profile Custom Property

New Managed Properties

 

  • You can test this by searching on the Person name or by the Custom Property value. For this sample we had created a Custom Property ‘CustomAttrib’ with the value ‘Custom Attrib One’

Result page

 

  • Voila, it works !!!!
Categories