Enterprise Search Web Parts are still Sealed! Unseal them! (SP2010)
Posted
Wednesday, December 9, 2009 3:44 PM
by
CoreyRoth
I am pretty passionate about Enterprise Search and with MOSS 2007 I saw customers really struggle because wildcard search was not offered out of the box and most of the web parts in Microsoft.Office.Server.Search.WebParts are sealed. Luckily, the most important one CoreResultsWebPart was in fact not sealed and I was able to hack together a wildcard search solution by inheriting it and using some hacky reflection. Since SPC09, we’ve been hearing “the search web parts are no longer sealed”, this unfortunately is not true at all. What they mean to say is that they have added a couple of override to CoreResultsWebPart that allow you to affect the query going in and the results going out. This is a nice win, but there is still more desired.
It took me asking a lot of people at SPC09 to finally get a straight answer. It was in the session, Customizing Search in SharePoint: Building Great Sites with Search, where I asked Harneet Sidhana at the microphone to get the story on why most web parts are still sealed. The answer? The remaining web parts are currently still sealed by design. The audience “booed”. Seriously, they did. I then asked to have the web parts unsealed and the audience applauded.
Let’s take a look at the web parts between MOSS 2007 and SP2010 Beta 2 and see what is sealed.
Web Part | MOSS 2007 | SP2010 Beta 2 |
AdvancedSearchBox | Sealed | Sealed |
CoreResultsWebPart | Unsealed | Unsealed |
FederatedResultsWebPart | Unsealed | Unsealed |
HighConfidenceWebPart | Sealed | Sealed |
PeopleCoreResultsWebPart | Sealed | Sealed |
PeopleRefinementWebPart | | Unsealed |
QuerySuggestionsWebPart | | Unsealed |
RefinementWebPart | | Unsealed |
SearchPagingWebPart | Sealed | Sealed |
SearchStatsWebPart | Sealed | Sealed |
SearchSummaryWebPart | Sealed | Sealed |
TopFederatedResultsWebPart | Unsealed | Unsealed |
Looking at this list, I don’t really see anything that has changed from sealed to unsealed. Do you? I will point out that CoreResultsWebPart has always been unsealed, but this is because PeopleCoreResultsWebPart inherits from it. Did you notice that anything built since the Infrastructure Update of MOSS 2007 has been unsealed?
Now I admit, the main reason we wanted to inherit from these controls was to do wildcard search. The Enterprise Search did a great job with the new keyword query improvements and this will be a non-issue now. However, can they really say we will never want to extend their web parts? Are they going to say that they have thought of every possible thing that the web part might possibly do and no one will ever extend it? As a programmer, I don’t think I would ever have the guts to make a claim like that. I know these web parts will require customization in the future. Give us the ability to do it.
I know you might be thinking, “We just wanted to inherit from these web parts because we wanted wildcard search. We have that now.” This is true and I am very thankful. This eliminates the need a lot, but more than likely we might need to make a change to something else though. Want to customize people search? What about best bets or the advanced search box? Most web parts in SharePoint are unsealed, so why are the search web parts sealed?
The PeopleCoreResultsWebPart still being sealed is a huge deal. For one, it doesn’t appear to support the new QueryManager class which means you can’t customize how it does queries or builds the results. I need to confirm this though. Take a look at the forums. They speak for themselves. Fifty results for the term wildcard in the Search forum. I am passionate about this topic because I have seen the needs of my customers. The fact that I might be stuck with another set of sealed web parts for another 3+ years is absolutely scary to me.
So what can we do? Please post a reply in the forum or leave a comment on the blog. We need to let them know our concerns while there is still time to make a change. Please, unseal the web parts. This post is cross posted to the SharePoint 2010 forums.