SharePoint 2010 People Search using Metadata

The scenario is simple; what you want is to configure people search and allow that to search using a custom metadata property that is being populated into the user profiles from an external system like a BCS system. I will dedicate several posts for configuring the user profiles service and synchronization from an external source. But for this post I assume that the user profiles synchronization is up and running and that we added an extra profile property for example employee ID from an external system. So here are the steps.

  1. Make sure that the “Managed Metadata Service” is provisioned and running before you perform this procedure.
  2. Once the initial full synchronization is completed we should check that the custom property is populated to the users profiles as expected.
  3. Open the SharePoint central administration web site.
  4. Create a new content source for your user profiles
    Select your configured search application
    Click Manage
    Fill in the required fields and mark how we write the URL of the SharePoint site to the my sites host URL with a special sps3 protocol.
    Create schedules as required
    Select full crawl check box (you can do that later if you want)
    Click OK
  5. Keep refreshing the content sources page until the crawl has finished.
  6. Create a new metadata property pointing to your custom user profile property.
    Click “Metadata Properties”
    Click “Add Mapping”
    Select “People:EmployeeID” (This is the crawled property and you will never find it until you perform the initial full crawl of the users profiles) and then OK
  7. Once this is done and this is a very important step RUN ANOTHER INCREMENTAL CRAWL.
  8. Open your search center that you want the user to use the new metadata property and now we will customize this page to add the new managed property.
    Click the “People” link.
    Click on site actions and then edit page.
    Open the search box web part properties
    Now in this window add a new line like this:
    <Property Name="EmployeeID" ManagedName="EmployeeID" ProfileURI="urn:schemas-microsoft-com:sharepoint:portal:profile:EmployeeID"/>
    Click ok twice
    Now when you click on search options you see this view
    And if you enter any employee ID in the designated section you get results as following
    Please note the query format.

So now your users are able to search for a user profile using their HR system employee ID.

Please note one thing if you want to localize the name of the property you will have to change the field name in this line to whatever you want.

<Property Name="EmployeeID" ManagedName="EmployeeID" ProfileURI="urn:schemas-microsoft-com:sharepoint:portal:profile:EmployeeID"/>

Happy SharePointing Smile

Leave a Reply

Please log in using one of these methods to post your comment: Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.