SearchBox ignores custom scope search result page 

Another one out of the "weird" series: now, our FC.ImageSearch solution includes an "All Images" custom scope that has an "ImageSearch.aspx" result page attached to it and usually, when the user selects this scope in the Search Dropdown menu, the search result is shown in the before-mentioned result page. But NOT always!
 
A search with this configuration:
 
SearchBox With All Images Scope
 
...resulted in the dreaded OSSSearchResults page on one of our MOSS test servers:
 
The dreaded OSSSearchResultsPage
 
Hmm, if this was the SearchBox on the landing page of the Search center, you could simply go into its Web Part properties and fix the problem there but, unfortunately, this is the SearchBox on the master page, so you can't simply call "Edit page" for it. What's worse, messing around with the control on the masterpage wouldn't necessarily help much either, as that's only a Delegate control.
 
Well, there's still an easy way to solve this: simply open up the "\12\TEMPLATE\FEATURES\OSearchEnhancedFeature\SearchArea.xml" file and add the following property, which is selected in the screenshot below:
 
SearchBox with added property
Close and save the file, do an "iisreset", refresh your page, re-issue the query and you should see the search result page of the custom scope come up:
 
Correct Search Result page after property modification
 
Easy to solve but still annoying that the default setting of the SearchBox would ignore the result page of the custom scope. If I were the product manager I'd call that a bug, Microsoft probably calls it a feature. ;-)
 
Posted on 11-May-10 by Jennifer Neumann
4 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
Tags: Search, Configuration, Sharepoint
 

Comments

Thursday, 13 May 2010 10:51 by Andy Burns
Just a thought - the Small Search Input Box is a SharePoint Delegate control. That is, you could specify another control with a *lower* sequence number in a Feature, and when activated that Feature would 'replace' the control already provided. In fact, if memory serves, SharePoint already does that with the Small Search Input Box. Just that way, you wouldn't have to edit a standard Feature, and you could easily roll this out across multiple servers/site collections, etc.. See : http://msdn.microsoft.com/en-us/library/ms463169.aspx and http://msdn.microsoft.com/en-us/library/ms470880.aspx

Thursday, 13 May 2010 12:04 by Jennifer
Andy, you're absolutely right.: E.g. the Search Server Express 2008 has 3 definitions of the SmallSearchInputBox, the lowest with a Sequence number of 25. So installing a new one with a lower sequence number using a Feature is definitely the "right" way to do it. I was working on test machine and simply interested in confirming that the "bug" was not caused by a wrong setting in our software ;-) Because of the quick turn-around time I prefer modifying the SharePoint definition (and iisreset) over writing/modifying/deploying a feature. But again, in production one should go the way you described.

Friday, 14 May 2010 01:15 by Andy Burns
Aye, that's the way I do it too - make it work, then make it repeatable - at least as far as pages and web part configurations go! But it's worth knowing about the second step - too many times have I found systems that other consultants have just changed things directly.

Friday, 14 May 2010 01:24 by Jennifer
I'd say it's a fairly common "Beginners" mistake, as the overall concepts to features and deployments seem to be such a big mountain that it is tempting to do the quick fix ...but come the third time of making all the manual modifications again (e.g. after a reinstall) then all of a sudden features make a whole lot'a sense :-) I do not envy your situation as a consuiltant in this scenario: that can easily cost you a lot of time to identify the cause of the non-standard behaviour, which the customer is reluctant to pay for :-|

Name:
URL:
Email:
Comments:

CAPTCHA Image Validation