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

SharePoint 2010 Server Name and Alternate Access mapping


The “Server Name” mapping and “Alternate Access” mapping are two features of SharePoint which provides to alter the URL’s returned in search results. A very common practice is used by different companies is “Internal” and “External” users. These both OOTB features are available in SharePoint 2010.
Let’s see these two mapping options in detail.

Server Name Mapping

1.   It is designed for file sharing and also for http content.
2.   You cam map any server name to anything you like (it should point to the same set of pages).
Example: If you have a site called http://info  and you want to show it as www.eblogin.com. By setting up the server name mapping, you crawling will use http://info   for indexing; the good thing is that user will only see www.eblogin.com

Alternate Access Mapping

1.   It is designed for “SharePoint” content.
2.   It is basically used for allowing you to modify the results URL’s based on the access URL’s for a site. If you have a same page, a user accessing that page internally will get the internal URL. While if the same page is access externally the user will see the external URL.
Example: If you have same SharePoint contents, the internal user will use http://InternalEblogin   to access the site (all search result are prefix with http://InternalEblogin/ .....  ), and the External users will user http://ExternalEblogin/    to access site (all search result are prefix with http://ExternalEblogin /.... ).
3.   It does not require a crawl for the setting to take effect.
4.   It will generate result based on how the site is being accessed.
5.   It will configured at farm level, now if you have more than one search service application in your farm, all of them will be using “Alternate Access mapping”
Using the combination of Server name and Alternate access mapping you can manage URL mapping in search results.

Reference:

http://www.eblogin.com/eblogin/post/2011/03/25/sp-accessMapping.aspx#.VIhjzCxxgp4

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

How to Prevent SharePoint 2010 users from using SharePoint Designer

Problem

SharePoint Sites can be edited using SharePoint Designer for customizing the user interface and other purposes. But at times, it could potentially affect the performance of sites. In such cases, some administrators prefer to not to allow customization using SharePoint Designer.

Solution

Not only can SharePoint 2010 limit users from using SharePoint Designer 2010 but it can also stop users from detaching pages, customizing the master page and layout pages and it even preventing the change of the Web Site URL Structure. In this article, we will look into how to stop users from editing the site using SharePoint Designer 2010.

Go to Central Administration -> Application Management:



Under Web Application, click Manage Web Applications.



Select the application on which you want to restrict all users from using SharePoint Designer 2010. Click on the application name.



A ribbon will be available at the top once you select the application. Click on general settings and then on SharePoint Designer.



A box will be prompted with some options.To restrict user, uncheck the "Enable SharePoint Designer" checkbox. Click OK.



Now go to any site page. Click on the "Page" Tab on Ribbon. Click on Edit and then on "Edit in SharePoint Designer". Enter the credentials. Once you enter the needed credentials, you will be prompted with an error describing that the user is not allowed to edit site in SharePoint Designer (see image below).



One can use this feature to stop every user from accessing the SharePoint site using SharePoint Designer.
Reference:

http://www.mssharepointtips.com/tip.asp?id=1091

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