<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.sharepointblogs.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Marks MOSSels</title><subtitle type="html" /><id>http://www.sharepointblogs.com/marksmossels/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.sharepointblogs.com/marksmossels/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.sharepointblogs.com/marksmossels/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20611.960">Community Server</generator><updated>2008-03-06T11:15:00Z</updated><entry><title>Advanced Search Box &amp; Search Core Results web part on one page: Watch Out!</title><link rel="alternate" type="text/html" href="http://www.sharepointblogs.com/marksmossels/archive/2008/03/06/advanced-search-box-amp-search-core-results-web-part-on-one-page-watch-out.aspx" /><id>http://www.sharepointblogs.com/marksmossels/archive/2008/03/06/advanced-search-box-amp-search-core-results-web-part-on-one-page-watch-out.aspx</id><published>2008-03-06T10:15:00Z</published><updated>2008-03-06T10:15:00Z</updated><content type="html">&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;My first blog post on sharepointblogs.com is about an issue&amp;nbsp;I came by&amp;nbsp;this week.&lt;/p&gt;
&lt;p&gt;Typically, if you create a new SharePoint Site based on the Search Center template (under Enterprise), you get a teamsite with a few prefab pages: &lt;strong&gt;default.aspx&lt;/strong&gt;, &lt;strong&gt;advanced.aspx&lt;/strong&gt; and &lt;strong&gt;results.aspx&lt;/strong&gt;. By default, the &lt;strong&gt;advanced&lt;/strong&gt; page houses the &lt;em&gt;Advanced Search Box web part&lt;/em&gt;, which is configured to show its results on the &lt;strong&gt;results&lt;/strong&gt; page. The &lt;strong&gt;results&lt;/strong&gt; page houses, among some other web parts, the &lt;em&gt;Search Core Results web part&lt;/em&gt; which is responsible for rendering the search results.&lt;/p&gt;
&lt;p&gt;A customer asked us if it was possible to put these two web parts on the same page, so the search results would render below the advanced search form. If a user then wants to&amp;nbsp;refine his search query he wouldn&amp;#39;t have to go back to the previous page. &amp;quot;That&amp;#39;s easy&amp;quot;, you might think, and at first it did seem quite trivial:&lt;/p&gt;
&lt;p&gt;Just put the &lt;em&gt;Core Search Results web part&lt;/em&gt; to the &lt;strong&gt;advanced&lt;/strong&gt; page, together with one or two &lt;em&gt;Search Paging web parts&lt;/em&gt;. Then configure the &lt;em&gt;Advanced Search Box web&amp;nbsp;part&lt;/em&gt;&amp;nbsp;to show results on the &lt;strong&gt;advanced &lt;/strong&gt;page instead of the &lt;strong&gt;results &lt;/strong&gt;page (Results URL property) and you&amp;#39;re done.&lt;/p&gt;
&lt;p&gt;Though the above described steps might make you think you&amp;#39;ve done it, and it might even show the correct search results&amp;nbsp;in your first test run, be aware that if you&amp;#39;re starting to use the Result Type selection, all of a sudden it&amp;#39;s not &amp;quot;all&amp;nbsp;good&amp;quot;. Somehow, putting the &lt;em&gt;Advanced Search Box web part&lt;/em&gt; on a page together with the &lt;em&gt;Core Search Results web part&lt;/em&gt; makes it hard for SharePoint to remember what&amp;nbsp;the user&amp;nbsp;selected as Result Type. Check out this example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;A user types &amp;quot;Microsoft&amp;quot; in free search text box &amp;quot;&lt;strong&gt;All&lt;/strong&gt; of these words:&amp;quot;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;The user selects &amp;quot;Word Documents&amp;quot; as a &amp;quot;Result &lt;strong&gt;type&lt;/strong&gt;&amp;quot;, because he/she only wants to see&amp;nbsp;Word documents with the term &amp;quot;Microsoft&amp;quot; in it&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;The user clicks the Search button&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;The system at first shows correct results (of course items should be available in the system for results to come up)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;But by clicking the Search button again, or by navigating to the next Page in case of a big search result set, the Result Type selection all of a sudden is ignored. Now all items that contain the term &amp;quot;Microsoft&amp;quot; in it.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Is it a bug? Is it a feature? What causes this wicked behavior?&lt;/p&gt;
&lt;p&gt;To be honest, I don&amp;#39;t really know, but I think it has something to do with the javascript blocks&amp;nbsp;and hidden form fields that are&amp;nbsp;rendered by the web parts. I haven&amp;#39;t done any thorough research so I&amp;#39;m not sure. This post is just a warning in case you think of customizing your search center in the same way I did. If anyone out there has something to add to this,&amp;nbsp;maybe even has a solution, please let me know!&lt;/p&gt;
			&lt;hr&gt;&lt;span style="font-size:10pt;"&gt;Posted on &lt;a href="http://www.sharepointblogs.com/"&gt;SharePoint Blogs&lt;/a&gt;&lt;/span&gt;
		  &lt;img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=13661" width="1" height="1"&gt;</content><author><name>Zarus</name><uri>http://www.sharepointblogs.com/members/Zarus.aspx</uri></author><category term="search" scheme="http://www.sharepointblogs.com/marksmossels/archive/tags/search/default.aspx" /><category term="search center" scheme="http://www.sharepointblogs.com/marksmossels/archive/tags/search+center/default.aspx" /><category term="advanced search" scheme="http://www.sharepointblogs.com/marksmossels/archive/tags/advanced+search/default.aspx" /><category term="MOSS2007" scheme="http://www.sharepointblogs.com/marksmossels/archive/tags/MOSS2007/default.aspx" /></entry></feed>