Wildcard People Search on MOSS 2007
Written by Ramon Scott on July 8, 2008 – 6:34 pm -Unfortunately out-of-the-box Microsoft Office SharePoint Server 2007 does not play nice with wildcard searches. This is particularly troublesome when searching for people with hard to spell names.
Here’s a quick solution for a adding a web part to the home page that allows for searching for people using first, last or a combination of names. Wildcards are supported on either.
So, entering a first name of Rob would return results for Rob, Robert, Roberta, Robbie, etc. Likewise, a last name search for Smit would return results for Smith, Smits, Smitkerson, etc.
To use this, just add a content editor web part to the moss home page and paste the code below into the source view. The form will submit to the default people search results page.
Tags: MOSS, SharePoint, WSS
Posted in SharePoint |

July 18th, 2008 at 8:34 am
How would you add an additional field for Department to perform wildcard searches?
July 22nd, 2008 at 12:13 am
Hi, thanks for the excellend post, its very good solution for wildcard search. But I have a slightly different scenario. The client doesn’t want separate text boxes for first name or last name or any other property. There is a single textbox similar to the standard search webpart, and in that want to incorporate the wildcard search. Any ideas for that, or how I can modify script as given by you. Any help would be more than welcome. Thanks
July 30th, 2008 at 7:27 am
Excellent post…very simple…the only problem I have is that with the results, the formatting of all of the employees information is non-existent…it is one long string of information. Do you know where I might make the changes, or what changes TO make on the peopleresults.aspx page so that the formatting is correct?
July 31st, 2008 at 7:25 pm
Leigh, I’ve added another post with an example for departments at http://www.ramonscott.com/wordpress/?p=17.
July 31st, 2008 at 7:28 pm
Preet, I haven’t tried it, but I understand Ontolica has a very good wildcard search add-on for MOSS 2007 that’s available for free (http://www.ontolica.com/Ontolica%20for%20MOSS%202007/Ontolica%20Wildcard.aspx).
July 31st, 2008 at 7:34 pm
Hi Jay, the People Search Core Results web part on the peopleresults.aspx can be customized by modifying the XSL in the web part configuation. Paul Galvin’s has a blog entry that will give you more understanding. http://blogs.conchango.com/paulgalvin/archive/2008/03/10/walk-through-use-people-search-for-department-contacts.aspx
September 18th, 2008 at 2:43 am
hii .i tried this people search but it is working for only my detail is displaying not others.Is there any other settings to be done in peoplesearch result page?pls reply me in detail.
September 18th, 2008 at 2:49 am
where i should add the details of the people.
September 22nd, 2008 at 6:38 am
Is there a way to search for phrase endings? All wildcard solutions offer only begining phrase search.
If I had a telephone number string like: 984395857883 and tried to search for extension *883 in MOSS can I do it at all?
September 23rd, 2008 at 2:38 am
Hi Ramon,
I modified your code to enable wild card search on PreferredName (e.g. Kelvin Chris) instead.
I entered “Kelvin” but there isn’t any result.
Any idea?
Thank you in advance!
September 26th, 2008 at 7:06 am
I like your example of a division dropdown, but does wildcard searching work on something like Skills and Responsibilities? I tried passing skills:”C” to the peopleresults page and it only returns exact matches. Is there some configuration that needs to be changed?