Skip to main content

Larry Kuhn

Larry Kuhn
  

 Midwest Bloggers

  Arbindo Chattopadhyay
  U.S. Midwest SharePoint Community
  Ram Gopinathan
  Larry Clarkin
  Kevin Hammond
  Dave Bost
  Angela Binkowski
  Andrew Ehrensing
  John West

 User Groups

  Chicago SharePoint User Group
  Chicago .NET Users Group
  Chicago Windows User Group
  Chicago Visual Studio Team System User Group
Larry Kuhn > Posts > People Search Content Editor Web Part
People Search Content Editor Web Part
This post is a very long overdue follow up to my post Prefix Matching on Search Properties in Keyword Queries.  Thanks to Mahendra for the inspiration to finish it up.
 
In that post, I explained the underhood mechanics of how to provide users with a more functional people search experience, but I left it up to the reader to apply that information to build a usable solution.  Well, here's a solution you can use.
 
Recap of the Problem
MOSS provides you with a search box that has a scope called "People" which enables you to search user profile data:
Out Of Box - People Search box
Now, imagine the scenario where you are in a meeting, and you meet a guy for the first time and he introduces himself "Hi, I'm David Richarts" (or at least this is how you heard it...he did have a bit of an accent...hm.. oh well).  After the meeting you need to find his contact info, so you trot on over your SharePoint intranet home page to use that People search feature, run your search, and what do you get?
Dave's not here, man
 
Now what are you going to do?  If you are the slightest bit saavy, you'll say to yourself "he could be listed as 'Dave' rather than 'David' and he could have been saying 'Richards' afterall... I'll just use this little Search Options do-dad and enter parts of his names!" (Aren't you clever!  Many users don't even notice that link to the right of the search box.) So that's what you do:
Aren't I Clever
 
And now what do you get?
Son of a ...
 
At this point you have now confirmed what you've suspected all along - SharePoint search stinks!
 
But alas, it's not SharePoint search that stinks, it's just the user interface.  If you read the original post linked at the beginning of this article you'll recognize that the problem here is that those partial names were enclosed in quotes by the Search Options UI. We can fix this!
 
Enter the People Search Content Editor Web Part.  It's intended to be placed prominently on the home page of your intranet (and anywhere else where the above scenario of frustration might originate.)  It looks like this, shown here with our partial names:
Spiffy, ain't it?
 
Hit enter or click the magnifying glass, and finally you've found Dave:
Success!
 
The code in the .dwp file is pretty straightforward.  The only part you might need to tweak is the path to your people search results page, which is set in the code as '/SearchCenter/Pages/PeopleResults.aspx'
 

Comments

Only in MOSS *Enterprise* ?

Am I right in assuming that this
 
"MOSS provides you with a search box that has a scope called "People" "
 
is only in MOSS Enterprise.
 
(Or have I interpreted the Wrox Search book incorrectly?)
at 12/15/2008 12:21 AM

Fix or Workaround

Great post! I added your web part on my homepage and it works. One question, on your post you mention "We can fix this!" Is there a way to really FIX the people search tab on the search center? Or is this a workaround/replacement for the out of the box people search?
 
Thanks!
at 2/18/2009 10:27 AM

Disable links

Do you know how to disable the Links to Name (in your case it is Dave Richards) and Add to My Colleagues?
 
With many thanks,
at 4/5/2009 5:40 PM

RE: Fix or Workaround

Well, yes, I guess what I have provided is a technically just a workaround.  I know of no way to "fix" the regular search box to have the same behavior.  The reason why has to do with how the keyword query is processed by the query engine. - Sorry.
lkuhn at 4/27/2009 7:34 PM

RE: Disable links

Yes, this can be achieved by modifying the XSLT used by the Core Results Web Part so that it does not render anchor tags for these items.  Search on MSDN for "customize 'core results web part'" - there are good articles there.
lkuhn at 4/27/2009 7:36 PM

Populate text boxes with url

I'd like to replace the original control in the people result page with yours.  It would be great if it could read the url to populate the firstname and lastname listboxes when it loads.  Anyone knows how I could do that?
Thanks,
Great work!
 
GBelzile
at 6/16/2009 12:38 PM

Re: People Search Content Editor Web Part

Pretty neat......
Also I was able to modify the xsl file to rearrange the results display.
Thanks
at 7/22/2009 12:08 PM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body (required) *

Name (required) *


URL

Type the Web address: (Click here to test)  

Type the description: 

Attachments