Wildcard Search with MOSS People Search

Posted Monday, June 23, 2008 4:00 PM by CoreyRoth

After having success with implementing wildcard search with MOSS, I decided to look into this whether or not I could inherit from the PeopleCoreResultsWebPart today to implement wildcard search functionality and unfortunately I did not get very far.  The issue is that the class is sealed.  This means that I can't just simply inherit from it and change the method that sets the query.  I now understand that the only reason CoreResultsWebPart is not marked sealed (its the only search web part that isn't) is because it had to be left unsealed so that the People Search web part could inherit from it.  I can probably do some more hacking by creating my own web part and using some reflection to load the PeopleCoreResultsWebPart and change what I need to, but that is going to take some time.  In the meantime, you can always use the WildcardSearchCoreResultsWebPart (but of course you give up all of the fancy PeopleCoreResultsWebPart functionality) or you can make use of Ramon Scott's handy JavaScript.

Comments

# re: Wildcard Search with MOSS People Search

Thursday, December 18, 2008 3:54 AM by gpollock

Hey Corey,

Did you decide whether or not you were going to put some time in and develop your own People Search web part to get around the sealed class?

Cheers

Gavin

# re: Wildcard Search with MOSS People Search

Thursday, January 22, 2009 5:18 PM by CoreyRoth

I want to, but I just haven't had time to look at it.  I am pretty skeptical about getting this case to work, but it is a feature that I would love to see.

# re: Wildcard Search with MOSS People Search

Thursday, November 26, 2009 3:56 AM by Damjan

Hi Corey,

I wouldn't recommend you to even try to do this :)

I lost a couple of days fighting with it using reflection, but couldn't do anything usefull.

The only solution to this would be to create brand new web part that would mimic all the behaviour of the PeopleCoreResultsWebPart (but also I'm not sure if this would be possible, since when you decompile PeopleCoreResultsWebPart you can see that the most of it's properties are of some internal types..).

I think we'll have to wait for SP 2010 for this 'cause I read somewhere that this class is not sealed anymore..

Cheers,

Damjan

# re: Wildcard Search with MOSS People Search

Thursday, November 26, 2009 8:39 PM by CoreyRoth

Yes, I tried the same and did not get very far.  Unfortunately, with the last build of Beta 2 I tried, the PeopleCoreResultsWebPart is still in fact sealed.  The good news is people search supports phonetic searching and wildcards out of the box so maybe this will be a non-issue.

Leave a Comment

(required) 
(required) 
(optional)
(required)