Showing posts with label People Search. Show all posts
Showing posts with label People Search. Show all posts

Wednesday, 10 December 2014

People Search in SharePoint 2010


People Search Box Web Part in SharePoint 2010



People Search is one of the great and useful features of SharePoint 2010. By using people search feature of the SharePoint 2010 users can find their co-workers not just by their names, by their hobbies, interests, department, job title, knowledge and expertise as well.

In this blogbost I would like to show you how you can enable the SharePoint People Search web part and customize it. So let's get started.

If you have a brand new SharePoint 2010 farm or you have not configure the search in your SharePoint 2010 platform, this is something you need to take care first. Here is how:
  • You need to visit the SharePoint central admin and locate your content sources under the search service application by clicking "Application Management", "Manage Service Applications", "Search Service Application" and "Content Sources".
  • If this is a new instance you'll probable have one item called "Local SharePoint sites". Please click this content source and edit.
  • In this page you need to make sure sps3://MySiteRoot item is in your start addresses list. 
  • You alse need to scheudle the full and incremental crawl in this page and check "Start full crawl of this content source" before clicking "Ok.
  • At this time you'll see the following screen:
Once this is completed, now you can insert SharePoint 2010 People Search Box web part into any page you desire. In my example I am placing the web part right into the SharePoint home page. 
  • First you will edit the page by going "Site Actions", "Edit Page"
  
  • Then you can select "Insert", "Web Part" by going "Editing Tools" ribbon.
  • You will chose "People Search Box" web part under the "Search" category of web parts. 


  • Once the People Search Box web part is added tot he page then we can configure the web part selecting "Edit Web Part" from the web part drop down menu.
  • While you are editing the web part, you can have scopes drop down menu and select which search scope you'd like to use and in which format. In this blog post since I will be showing the People Search, I am not including the "Scopes" drop down menu.
  • You can configure the Query Text Box, by assigning a label, fixing it's size, and defining the text box prompt string.




  • Query suggestions is a great way to display keyword suggestions to end-user while they are typing the query. These suggestion will be created automatically by SharePoint automatically based on certain number of click-throughs. There is a daily timer job scheduled to compile the suggestions. It is called "Prepare query suggestions" timer job and it is turned on by default.  If you are testing the keyword suggestions, you probably don't have any suggestion compiled yet. You can add these suggestions manually with power shell scripts. here is an example:
$searchapp = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"
New-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $searchapp -Language En-Us -Type QuerySuggestionAlwaysSuggest -Name "Jeff Armstrong"
New-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $searchapp -Language En-Us -Type QuerySuggestionAlwaysSuggest -Name "John Smith"
New-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $searchapp -Language En-Us -Type QuerySuggestionAlwaysSuggest -Name "Jennifer McDonald"
Start-SPTimerJob -Identity "prepare query suggestions"
  • There are many options to configure in miscellaneous section of the SharePoint People Search Box web part. Please refer to this TechNet article for further configuration options: Change properties for the Search Box Web Part (SharePoint Server 2010)
  • Once it is configured you can save the web part and save and check-in the page you are editing. This is how it will look like on the page: 

If you have done everything correctly and you have SharePoint publishing features enabled you will get a "404-Page not found" error because "peopleresults.aspx" does not exist in the Site Pages library. There are a few ways to workaround this issue. One of them is to create people results page manually. which is detailed in my other blog post called "People Search Results Return 404 - peopleresults.aspx is missing."
Here is how your results page will look like:

Reference:

http://sharepointtidbits.blogspot.in/2012/10/people-search-in-sharepoint-2010.html

Enterprise People Search In SharePoint 2010


Excellent post by Nilkant explained step by step

Reference:

http://www.dotnetfunda.com/articles/show/1259/enterprise-people-search-in-sharepoint-2010

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
    clip_image002
    Select your configured search application
    clip_image004
    Click Manage
    clip_image006
    clip_image008
    clip_image010
    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.
    clip_image011
    Create schedules as required
    clip_image012
    Select full crawl check box (you can do that later if you want)
    clip_image013
    Click OK
    clip_image014
  5. Keep refreshing the content sources page until the crawl has finished.
    clip_image016
  6. Create a new metadata property pointing to your custom user profile property.
    Click “Metadata Properties”
    clip_image018
    clip_image019
    clip_image020
    Click “Add Mapping”
    clip_image021
    clip_image022
    clip_image023
    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
    clip_image024
    clip_image025
  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.
    clip_image027
    Click on site actions and then edit page.
    Open the search box web part properties
    clip_image028
    clip_image029
    clip_image030
    Now in this window add a new line like this:
    <Property Name="EmployeeID" ManagedName="EmployeeID" ProfileURI="urn:schemas-microsoft-com:sharepoint:portal:profile:EmployeeID"/>
    clip_image031
    Click ok twice
    Now when you click on search options you see this view
    clip_image032
    clip_image033
    And if you enter any employee ID in the designated section you get results as following
    clip_image035
    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

Reference:

http://blogs.technet.com/b/meamcs/archive/2010/12/23/sharepoint-2010-people-search-using-metadata.aspx