<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Peter Gerritsen&#039;s blog &#187; Search</title>
	<atom:link href="http://blog.petergerritsen.nl/tag/search/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.petergerritsen.nl</link>
	<description>about .Net and application platform development</description>
	<lastBuildDate>Tue, 03 Jan 2012 08:03:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>People Search: Use a custom Ranking Model to search in added Profile Properties</title>
		<link>http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 13:37:04 +0000</pubDate>
		<dc:creator>Peter Gerritsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[SharePoint Profile System]]></category>
		<category><![CDATA[SP2010]]></category>

		<guid isPermaLink="false">http://blog.petergerritsen.nl/?p=855</guid>
		<description><![CDATA[When you use the out-of-the box components for searching for people, a generic search with a keyword that is included in an added Profile property will not give the results you might expect. This is especially a problem with the out-of-the-box webpart that shows information about a person: When you click on one of the [...]<p><a href="http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/">People Search: Use a custom Ranking Model to search in added Profile Properties</a> is a post from: <a href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>When you use the out-of-the box components for searching for people, a generic search with a keyword that is included in an added Profile property will not give the results you might expect. </p>
<p>This is especially a problem with the out-of-the-box webpart that shows information about a person:<br />
<br/><br />
<a  href="http://blog.petergerritsen.nl/wp-content/uploads/2010/10/Profile-properties-webpart.png" class="thickbox no_icon" rel="gallery-855" title=""><img src="http://blog.petergerritsen.nl/wp-content/uploads/2010/10/Profile-properties-webpart-300x103.png" alt="" title="Profile properties webpart" width="300" height="103" class="size-medium wp-image-856" /></a><br />
When you click on one of the values in this webpart, you will be redirected to the people search results page with the value you clicked passed in as the search keyword:<br />
<br/><br />
<a  href="http://blog.petergerritsen.nl/wp-content/uploads/2010/10/Profile-search-generic.png" class="thickbox no_icon" rel="gallery-855" title=""><img src="http://blog.petergerritsen.nl/wp-content/uploads/2010/10/Profile-search-generic-300x105.png" alt="" title="Profile search generic" width="300" height="105" class="size-medium wp-image-859" /></a><br />
But this will not give you any results. <a  href="http://kgraeme.wordpress.com/2010/07/28/sharepoint-user-profile-custom-properties-keyword-search-problem/">This post</a> by kgreame outlines the same problems and some of the steps he tried to solve this issue. In the comments to that post, a workaround is mentioned: map the matching crawled properties to the ContentsHidden Managed Property.<br />
There is however an other way. In <a  href="http://sharepoint.microsoft.com/blogs/LKuhn/Lists/Posts/Post.aspx?List=29310d0a-1eda-4834-bb4c-06ee575a40c3&#038;ID=52">this post</a> by Larry Kuhn, he explains how the DEFAULTPROPERTIES within the SharePoint Search work. By setting a weight of a Managed Property, you will include it in the ranking model SharePoint uses and the property is therefore added to the default properties that are searched.<br />
SharePoint 2010 introduces the concept of Ranking Models, so the solution mentioned in that blogpost doesn&#8217;t work. We can however create our own Ranking Model. I&#8217;ve copied the information from the Ranking Model that SharePoint uses for People Search and added my own Managed Property, Expertise, with a weight of 1.0:</p>
<pre class="brush: xml">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;rankingModel name=&quot;CustomPeopleRanking&quot; id=&quot;5EA2750C-8165-4f65-BD12-6E6DAAD45FE0&quot; description=&quot;Custom People Ranking&quot; xmlns=&quot;http://schemas.microsoft.com/office/2009/rankingModel&quot;&gt;
  &lt;queryDependentFeatures&gt;
    &lt;queryDependentFeature pid=&quot;177&quot; name=&quot;RankingWeightName&quot; weight=&quot;0.5&quot; lengthNormalization=&quot;0&quot; /&gt;
    &lt;queryDependentFeature pid=&quot;19&quot; name=&quot;PreferredName&quot; weight=&quot;1.0&quot; lengthNormalization=&quot;0&quot; /&gt;
    &lt;queryDependentFeature pid=&quot;24&quot; name=&quot;JobTitle&quot; weight=&quot;2.0&quot; lengthNormalization=&quot;0&quot; /&gt;
    &lt;queryDependentFeature pid=&quot;39&quot; name=&quot;Responsibilities&quot; weight=&quot;1.0&quot; lengthNormalization=&quot;5&quot; /&gt;
    &lt;queryDependentFeature pid=&quot;179&quot; name=&quot;RankingWeightLow&quot; weight=&quot;0.2&quot; lengthNormalization=&quot;5&quot; /&gt;
    &lt;queryDependentFeature pid=&quot;175&quot; name=&quot;ContentsHidden&quot; weight=&quot;0.1&quot; lengthNormalization=&quot;5&quot; /&gt;
    &lt;queryDependentFeature pid=&quot;35&quot; name=&quot;Memberships&quot; weight=&quot;0.25&quot; lengthNormalization=&quot;5&quot; /&gt;
    &lt;queryDependentFeature pid=&quot;178&quot; name=&quot;RankingWeightHigh&quot; weight=&quot;2.0&quot; lengthNormalization=&quot;0&quot; /&gt;
    &lt;queryDependentFeature pid=&quot;180&quot; name=&quot;Pronunciations&quot; weight=&quot;0.05&quot; lengthNormalization=&quot;0&quot; /&gt;
    &lt;queryDependentFeature pid=&quot;408&quot; name=&quot;Expertise&quot; weight=&quot;1.0&quot; lengthNormalization=&quot;0&quot; /&gt;
  &lt;/queryDependentFeatures&gt;
&lt;/rankingModel&gt;
</pre>
<p>We can then add this Ranking Model to SharePoint with Powershell:</p>
<pre class="brush: php">

Get-SPEnterpriseSearchServiceApplication | New-SPEnterpriseSearchRankingModel
</pre>
<p>And paste in the XML of this Ranking Model when Powershell prompts you for it.</p>
<p>But how do we force SharePoint to use this Ranking Model? I&#8217;ve outlined one of the solutions in a <a  href="http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/">previous post</a>. </p>
<p>So after adding a web part that sets the ranking model we can perform the search again:<br/><br />
<a  href="http://blog.petergerritsen.nl/wp-content/uploads/2010/10/Profile-search-after-ranking-model.png" class="thickbox no_icon" rel="gallery-855" title=""><img src="http://blog.petergerritsen.nl/wp-content/uploads/2010/10/Profile-search-after-ranking-model-300x139.png" alt="" title="Profile search after ranking model" width="300" height="139" class="size-medium wp-image-861" /></a><br />
And bingo, the user with this value in an extra profile property shows up in the search results.</p>
<p>Why use this over mapping the properties in the &#8216;ContentsHidden&#8217; Managed Property? As you can see the &#8216;ContentsHidden&#8217; property is included in the Ranking Model with a value of 0.1. If you want to give more weight to a custom property or you have more properties to which you want to assign a different weight, you will need to modify the Ranking Model.</p>
<!-- RO Social Bookmarks BEGIN --><div class="social_bookmark"><em>Bookmark to:</em><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Twitter"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/twitter.png" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Twitter" alt="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Twitter" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=People+Search%3A+Use+a+custom+Ranking+Model+to+search+in+added+Profile+Properties&#038;c=http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to MySpace"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/myspace.png" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to MySpace" alt="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to MySpace" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/&#038;title=People+Search%3A+Use+a+custom+Ranking+Model+to+search+in+added+Profile+Properties" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Del.icio.us"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/delicious.png" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Del.icio.us" alt="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Del.icio.us" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&#038;url=http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/&#038;title=People+Search%3A+Use+a+custom+Ranking+Model+to+search+in+added+Profile+Properties" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to digg"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/digg.png" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to digg" alt="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to digg" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/&#038;title=People+Search%3A+Use+a+custom+Ranking+Model+to+search+in+added+Profile+Properties" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to reddit"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/reddit.png" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to reddit" alt="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to reddit" /></a><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/&#038;t=People+Search%3A+Use+a+custom+Ranking+Model+to+search+in+added+Profile+Properties" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to FaceBook"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/facebook.png" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to FaceBook" alt="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to FaceBook" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Technorati"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/technorati.png" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Technorati" alt="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Technorati" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/&#038;title=People+Search%3A+Use+a+custom+Ranking+Model+to+search+in+added+Profile+Properties" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Stumble Upon"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/stumbleupon.png" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Stumble Upon" alt="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Stumble Upon" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&#038;output=popup&#038;bkmk=http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/&#038;title=People+Search%3A+Use+a+custom+Ranking+Model+to+search+in+added+Profile+Properties" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Google Bookmarks"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/google.png" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Google Bookmarks" alt="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to Google Bookmarks" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=People+Search%3A+Use+a+custom+Ranking+Model+to+search+in+added+Profile+Properties&#038;url=http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to SlashDot"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/slashdot.png" title="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to SlashDot" alt="Add 'People Search: Use a custom Ranking Model to search in added Profile Properties' to SlashDot" /></a></div><div id="dwcredit"><a  id="dwlogo" href="http://www.dream-webdesign.ro" title="Web design">web design</a></div>
<!-- RO Social Bookmarks END --><p><a  href="http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/">People Search: Use a custom Ranking Model to search in added Profile Properties</a> is a post from: <a  href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
<div class="fblike" style="height:25px; height:25px; overflow:hidden;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.petergerritsen.nl%2F2010%2F10%2F12%2Fpeople-search-use-a-custom-ranking-model-to-search-in-added-profile-properties%2F&amp;layout=standard&amp;show_faces=false&amp;width=320&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allow Transparency="true" style="border:none; overflow:hidden; width:320px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://blog.petergerritsen.nl/2010/10/12/people-search-use-a-custom-ranking-model-to-search-in-added-profile-properties/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Let the SharePoint Search web parts use an other Ranking Model</title>
		<link>http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 18:48:47 +0000</pubDate>
		<dc:creator>Peter Gerritsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[SP2010]]></category>

		<guid isPermaLink="false">http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/</guid>
		<description><![CDATA[SharePoint 2010 introduces the concept of Ranking Models. These models allow you to control the ranking of search results. But how do you tell the search web parts to use your custom ranking model, once you specified it? As far as I can tell there’s 2 options: Pass in the id of the model through [...]<p><a href="http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/">Let the SharePoint Search web parts use an other Ranking Model</a> is a post from: <a href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>SharePoint 2010 introduces the concept of Ranking Models. These models allow you to control the ranking of search results.</p>
<p>But how do you tell the search web parts to use your custom ranking model, once you specified it? As far as I can tell there’s 2 options:</p>
<ul>
<li>Pass in the id of the model through the querystring by appending “&amp;rm=&lt;guid of ranking model&gt;”</li>
<li>Use the Shared Query Manager</li>
</ul>
<p>The Shared Query Manager is _the_ option for modifying the query the search web parts are going to use.</p>
<p>To use the Query Manager to set an other Ranking Model I’ve created a custom web part. To retrieve the Query Manager all you have to do is call the static GetInstance method of the SharedQueryManager class.</p>
<p>After that, you can loop through the query manager and each location within the LocationList to set the ID of the Ranking Model:</p>
<pre class="brush: csharp">
public class SetRankingModel : WebPart
    {
        protected override void OnInit(EventArgs e)
        {
            try
            {
                QueryManager qm = SharedQueryManager.GetInstance(this.Page).QueryManager;

                foreach (LocationList ll in qm)
                {
                    foreach (Location l in ll)
                    {
                        try
                        {
                            l.RankingModelID = &quot;5ea2750c-8165-4f65-bd12-6e6daad45fe1&quot;;
                        }
                        catch { }
                    }
                }

                base.OnInit(e);
            }
            catch { }
        }
    }
</pre>
<p>After you’ve placed this web part on a search results page, each web part will use your custom Ranking Model.</p>
<!-- RO Social Bookmarks BEGIN --><div class="social_bookmark"><em>Bookmark to:</em><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Twitter"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/twitter.png" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Twitter" alt="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Twitter" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Let+the+SharePoint+Search+web+parts+use+an+other+Ranking+Model&#038;c=http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to MySpace"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/myspace.png" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to MySpace" alt="Add 'Let the SharePoint Search web parts use an other Ranking Model' to MySpace" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/&#038;title=Let+the+SharePoint+Search+web+parts+use+an+other+Ranking+Model" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Del.icio.us"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/delicious.png" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Del.icio.us" alt="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Del.icio.us" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&#038;url=http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/&#038;title=Let+the+SharePoint+Search+web+parts+use+an+other+Ranking+Model" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to digg"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/digg.png" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to digg" alt="Add 'Let the SharePoint Search web parts use an other Ranking Model' to digg" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/&#038;title=Let+the+SharePoint+Search+web+parts+use+an+other+Ranking+Model" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to reddit"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/reddit.png" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to reddit" alt="Add 'Let the SharePoint Search web parts use an other Ranking Model' to reddit" /></a><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/&#038;t=Let+the+SharePoint+Search+web+parts+use+an+other+Ranking+Model" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to FaceBook"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/facebook.png" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to FaceBook" alt="Add 'Let the SharePoint Search web parts use an other Ranking Model' to FaceBook" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Technorati"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/technorati.png" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Technorati" alt="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Technorati" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/&#038;title=Let+the+SharePoint+Search+web+parts+use+an+other+Ranking+Model" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Stumble Upon"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/stumbleupon.png" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Stumble Upon" alt="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Stumble Upon" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&#038;output=popup&#038;bkmk=http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/&#038;title=Let+the+SharePoint+Search+web+parts+use+an+other+Ranking+Model" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Google Bookmarks"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/google.png" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Google Bookmarks" alt="Add 'Let the SharePoint Search web parts use an other Ranking Model' to Google Bookmarks" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Let+the+SharePoint+Search+web+parts+use+an+other+Ranking+Model&#038;url=http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to SlashDot"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/slashdot.png" title="Add 'Let the SharePoint Search web parts use an other Ranking Model' to SlashDot" alt="Add 'Let the SharePoint Search web parts use an other Ranking Model' to SlashDot" /></a></div><div id="dwcredit"><a  id="dwlogo" href="http://www.dream-webdesign.ro" title="Web design">web design</a></div>
<!-- RO Social Bookmarks END --><p><a  href="http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/">Let the SharePoint Search web parts use an other Ranking Model</a> is a post from: <a  href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
<div class="fblike" style="height:25px; height:25px; overflow:hidden;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.petergerritsen.nl%2F2010%2F10%2F11%2Flet-the-sharepoint-search-web-parts-use-an-other-ranking-model%2F&amp;layout=standard&amp;show_faces=false&amp;width=320&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allow Transparency="true" style="border:none; overflow:hidden; width:320px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://blog.petergerritsen.nl/2010/10/11/let-the-sharepoint-search-web-parts-use-an-other-ranking-model/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)</title>
		<link>http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 11:55:56 +0000</pubDate>
		<dc:creator>Peter Gerritsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[SP2010]]></category>

		<guid isPermaLink="false">http://blog.petergerritsen.nl/?p=841</guid>
		<description><![CDATA[Today I was trying to fix an error in a custom webpart that performs a query on the SharePoint farm. The goal was to retreive the records within a site though the search system. First I added a metadata property ItemDeclaredRecord that is mapped to ows__vti_ItemDeclaredRecord (DateTime). Then I tried the following query (using Steve [...]<p><a href="http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/">Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)</a> is a post from: <a href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Today I was trying to fix an error in a custom webpart that performs a query on the SharePoint farm. The goal was to retreive the records within a site though the search system.</p>
<p>First I added a metadata property ItemDeclaredRecord that is mapped to ows__vti_ItemDeclaredRecord (DateTime).<br />
Then I tried the following query (using <a  href="http://blogs.technet.com/b/speschka/archive/2010/08/15/free-developer-search-tool-for-sharepoint-2010-search-and-fast-search-for-sharepoint.aspx">Steve Peschka&#8217;s Developer Search Tool</a>):</p>
<p><code>SELECT Size, Rank, Path, Title, Description, Write FROM scope() WHERE  (ItemDeclaredRecord &gt; '1900/01/01 00:00:00')  AND CONTAINS (Path, '&quot;/projecten&quot;')<br />
</code></p>
<p>This query works fine and retreives all records declared after January 1st, 1900 under the &#8220;projecten&#8221; site. To retreive all records within a specific subsite I then tried the following query:</p>
<p><code>SELECT Size, Rank, Path, Title, Description, Write FROM scope() WHERE  (ItemDeclaredRecord > '1900/01/01 00:00:00')  AND CONTAINS (Path, '"/projecten/subsite1"')</code></p>
<p>This threw a FaultException?!<br />
After fiddling around with the query for a few hours, I finally found a query that works:</p>
<p><code>SELECT Size, Rank, Path, Title, Description, Write FROM scope() WHERE  (ItemDeclaredRecord > '1900/01/01 00:00:00')  AND CONTAINS (Path, '"/projecten/subsite1"') ORDER BY Rank DESC</code></p>
<p>I&#8217;m not sure what the ORDER BY part does to the search system internally, but for now I&#8217;m guessing it&#8217;s SQL for &#8216;Pretty pretty please!&#8217;.</p>
<p>EDIT:<br />
The property you add in the ORDER BY part has to have the &#8220;Reduce storage requirements for text properties by using a hash for comparison” option checked.</p>
<!-- RO Social Bookmarks BEGIN --><div class="social_bookmark"><em>Bookmark to:</em><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Twitter"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/twitter.png" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Twitter" alt="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Twitter" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Strange+FullTextSqlQuery+query+behaviour+%28System.ServiceModel.FaultException%29&#038;c=http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to MySpace"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/myspace.png" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to MySpace" alt="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to MySpace" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/&#038;title=Strange+FullTextSqlQuery+query+behaviour+%28System.ServiceModel.FaultException%29" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Del.icio.us"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/delicious.png" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Del.icio.us" alt="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Del.icio.us" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&#038;url=http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/&#038;title=Strange+FullTextSqlQuery+query+behaviour+%28System.ServiceModel.FaultException%29" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to digg"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/digg.png" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to digg" alt="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to digg" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/&#038;title=Strange+FullTextSqlQuery+query+behaviour+%28System.ServiceModel.FaultException%29" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to reddit"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/reddit.png" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to reddit" alt="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to reddit" /></a><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/&#038;t=Strange+FullTextSqlQuery+query+behaviour+%28System.ServiceModel.FaultException%29" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to FaceBook"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/facebook.png" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to FaceBook" alt="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to FaceBook" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Technorati"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/technorati.png" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Technorati" alt="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Technorati" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/&#038;title=Strange+FullTextSqlQuery+query+behaviour+%28System.ServiceModel.FaultException%29" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Stumble Upon"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/stumbleupon.png" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Stumble Upon" alt="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Stumble Upon" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&#038;output=popup&#038;bkmk=http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/&#038;title=Strange+FullTextSqlQuery+query+behaviour+%28System.ServiceModel.FaultException%29" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Google Bookmarks"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/google.png" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Google Bookmarks" alt="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to Google Bookmarks" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=Strange+FullTextSqlQuery+query+behaviour+%28System.ServiceModel.FaultException%29&#038;url=http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to SlashDot"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/slashdot.png" title="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to SlashDot" alt="Add 'Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)' to SlashDot" /></a></div><div id="dwcredit"><a  id="dwlogo" href="http://www.dream-webdesign.ro" title="Web design">web design</a></div>
<!-- RO Social Bookmarks END --><p><a  href="http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/">Strange FullTextSqlQuery query behaviour (System.ServiceModel.FaultException)</a> is a post from: <a  href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
<div class="fblike" style="height:25px; height:25px; overflow:hidden;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.petergerritsen.nl%2F2010%2F09%2F20%2Fstrange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception%2F&amp;layout=standard&amp;show_faces=false&amp;width=320&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allow Transparency="true" style="border:none; overflow:hidden; width:320px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://blog.petergerritsen.nl/2010/09/20/strange-fulltextsqlquery-query-behaviour-system-servicemodel-faultexception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010 Search: Property Restriction in Keyword Queries</title>
		<link>http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 12:01:57 +0000</pubDate>
		<dc:creator>Peter Gerritsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[SP2010]]></category>

		<guid isPermaLink="false">http://blog.petergerritsen.nl/?p=808</guid>
		<description><![CDATA[The new version of SharePoint offers more capabilities in the keyword syntax to enhance the search experience. While in the previous version you had to resort to FullText SQL queries, a lot of things can now be accomplished with keyword syntax. For instance if you would like to filter on a date, you could use [...]<p><a href="http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/">SharePoint 2010 Search: Property Restriction in Keyword Queries</a> is a post from: <a href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>The new version of SharePoint offers more capabilities in the keyword syntax to enhance the search experience.<br />
While in the previous version you had to resort to FullText SQL queries, a lot of things can now be accomplished with keyword syntax.</p>
<p>For instance if you would like to filter on a date, you could use the following query:</p>
<pre class="brush: php">LastModifiedTime&amp;amp;amp;gt;=01/06/2010</pre>
<p>The actual format of the date depends on your regional settings (I&#8217;m using Dutch (nl-NL) in this case).</p>
<p>To search within a range of dates you can use the following query syntax:</p>
<pre class="brush: php">LastModifiedTime:28/06/2010..30/06/2010</pre>
<p>To exclude items you could use the following syntax:</p>
<pre class="brush: php">LastModifiedTime&amp;lt;&amp;gt;28/06/2010</pre>
<p>More info from MSDN about keyword syntax kan be found here: <a  href="http://msdn.microsoft.com/en-us/library/ee558911.aspx">http://msdn.microsoft.com/en-us/library/ee558911.aspx</a></p>
<!-- RO Social Bookmarks BEGIN --><div class="social_bookmark"><em>Bookmark to:</em><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Twitter"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/twitter.png" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Twitter" alt="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Twitter" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=SharePoint+2010+Search%3A+Property+Restriction+in+Keyword+Queries&#038;c=http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to MySpace"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/myspace.png" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to MySpace" alt="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to MySpace" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/&#038;title=SharePoint+2010+Search%3A+Property+Restriction+in+Keyword+Queries" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Del.icio.us"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/delicious.png" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Del.icio.us" alt="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Del.icio.us" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&#038;url=http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/&#038;title=SharePoint+2010+Search%3A+Property+Restriction+in+Keyword+Queries" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to digg"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/digg.png" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to digg" alt="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to digg" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/&#038;title=SharePoint+2010+Search%3A+Property+Restriction+in+Keyword+Queries" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to reddit"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/reddit.png" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to reddit" alt="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to reddit" /></a><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/&#038;t=SharePoint+2010+Search%3A+Property+Restriction+in+Keyword+Queries" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to FaceBook"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/facebook.png" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to FaceBook" alt="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to FaceBook" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Technorati"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/technorati.png" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Technorati" alt="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Technorati" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/&#038;title=SharePoint+2010+Search%3A+Property+Restriction+in+Keyword+Queries" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Stumble Upon"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/stumbleupon.png" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Stumble Upon" alt="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Stumble Upon" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&#038;output=popup&#038;bkmk=http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/&#038;title=SharePoint+2010+Search%3A+Property+Restriction+in+Keyword+Queries" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Google Bookmarks"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/google.png" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Google Bookmarks" alt="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to Google Bookmarks" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=SharePoint+2010+Search%3A+Property+Restriction+in+Keyword+Queries&#038;url=http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to SlashDot"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/slashdot.png" title="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to SlashDot" alt="Add 'SharePoint 2010 Search: Property Restriction in Keyword Queries' to SlashDot" /></a></div><div id="dwcredit"><a  id="dwlogo" href="http://www.dream-webdesign.ro" title="Web design">web design</a></div>
<!-- RO Social Bookmarks END --><p><a  href="http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/">SharePoint 2010 Search: Property Restriction in Keyword Queries</a> is a post from: <a  href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
<div class="fblike" style="height:25px; height:25px; overflow:hidden;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.petergerritsen.nl%2F2010%2F07%2F01%2Fsharepoint-2010-search-property-restriction-keyword-queries%2F&amp;layout=standard&amp;show_faces=false&amp;width=320&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allow Transparency="true" style="border:none; overflow:hidden; width:320px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://blog.petergerritsen.nl/2010/07/01/sharepoint-2010-search-property-restriction-keyword-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MOSS Search and browser languages</title>
		<link>http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link>
		<comments>http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 21:03:01 +0000</pubDate>
		<dc:creator>Peter Gerritsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MOSS]]></category>
		<category><![CDATA[Search]]></category>

		<guid isPermaLink="false">http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/</guid>
		<description><![CDATA[We had a very strange issue with some search functionality we developed for a portal. We created an option to search for documents in a library by specifying the path to a specific folder. This is done by specifying a keyword query like 9:”folder/subfolder”. In this case the searchproperty 9 contains the path of the item. While this [...]<p><a href="http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/">MOSS Search and browser languages</a> is a post from: <a href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>We had a very strange issue with some search functionality we developed for a portal. We created an option to search for documents in a library by specifying the path to a specific folder.</p>
<p>This is done by specifying a keyword query like <em>9:”folder/subfolder”</em>. In this case the searchproperty <em>9</em> contains the path of the item.</p>
<p>While this worked well on our development environments and most of the browsers we tested on, a some browsers it failed. My colleague Arthur discovered it had something to do with the language setting of the browser. When we used Dutch (nl-NL) as preferred language the standard core search results web part didn’t return any items when using a query with a “/” in the conditions.</p>
<p>If you execute a KeyWordQuery or FullTextSqlQuery in your own code you have the possibility to specify a culture to use in the search. Unfortunately the core search results web part doesn’t provide you with an option to do this easily. In the end I came up with a “hack” to make this work. Just change the preferred languages the browser sends with each request in the OnInit of a webpart that inherits from the standards core results web part like so:</p>
<pre class="brush: csharp">
protected override void OnInit(EventArgs e)
{
	if (!string.IsNullOrEmpty(CultureOverrideTo))
	{
		if (this.Page.Request.UserLanguages.Length &gt; 0)
			this.Page.Request.UserLanguages[0] = “en-US”;
	}

	base.OnInit(e);
}
</pre>
<p>Note: Because this modifies the current request this can have some consequences on other web parts on your page. So use it with care.</p>
<p>UPDATE:</p>
<p>This same behavior can also occur in custom search code. To fix this, simply specify the Culture of your KeyWordQuery or FullTextSqlQuery.</p>
<!-- RO Social Bookmarks BEGIN --><div class="social_bookmark"><em>Bookmark to:</em><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/" title="Add 'MOSS Search and browser languages' to Twitter"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/twitter.png" title="Add 'MOSS Search and browser languages' to Twitter" alt="Add 'MOSS Search and browser languages' to Twitter" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=MOSS+Search+and+browser+languages&#038;c=http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/" title="Add 'MOSS Search and browser languages' to MySpace"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/myspace.png" title="Add 'MOSS Search and browser languages' to MySpace" alt="Add 'MOSS Search and browser languages' to MySpace" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/&#038;title=MOSS+Search+and+browser+languages" title="Add 'MOSS Search and browser languages' to Del.icio.us"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/delicious.png" title="Add 'MOSS Search and browser languages' to Del.icio.us" alt="Add 'MOSS Search and browser languages' to Del.icio.us" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&#038;url=http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/&#038;title=MOSS+Search+and+browser+languages" title="Add 'MOSS Search and browser languages' to digg"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/digg.png" title="Add 'MOSS Search and browser languages' to digg" alt="Add 'MOSS Search and browser languages' to digg" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/&#038;title=MOSS+Search+and+browser+languages" title="Add 'MOSS Search and browser languages' to reddit"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/reddit.png" title="Add 'MOSS Search and browser languages' to reddit" alt="Add 'MOSS Search and browser languages' to reddit" /></a><br /><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/&#038;t=MOSS+Search+and+browser+languages" title="Add 'MOSS Search and browser languages' to FaceBook"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/facebook.png" title="Add 'MOSS Search and browser languages' to FaceBook" alt="Add 'MOSS Search and browser languages' to FaceBook" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/" title="Add 'MOSS Search and browser languages' to Technorati"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/technorati.png" title="Add 'MOSS Search and browser languages' to Technorati" alt="Add 'MOSS Search and browser languages' to Technorati" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/&#038;title=MOSS+Search+and+browser+languages" title="Add 'MOSS Search and browser languages' to Stumble Upon"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/stumbleupon.png" title="Add 'MOSS Search and browser languages' to Stumble Upon" alt="Add 'MOSS Search and browser languages' to Stumble Upon" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&#038;output=popup&#038;bkmk=http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/&#038;title=MOSS+Search+and+browser+languages" title="Add 'MOSS Search and browser languages' to Google Bookmarks"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/google.png" title="Add 'MOSS Search and browser languages' to Google Bookmarks" alt="Add 'MOSS Search and browser languages' to Google Bookmarks" /></a><a  class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=MOSS+Search+and+browser+languages&#038;url=http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/" title="Add 'MOSS Search and browser languages' to SlashDot"><img src="http://blog.petergerritsen.nl/wp-content/plugins/ro-social-bookmarks/slashdot.png" title="Add 'MOSS Search and browser languages' to SlashDot" alt="Add 'MOSS Search and browser languages' to SlashDot" /></a></div><div id="dwcredit"><a  id="dwlogo" href="http://www.dream-webdesign.ro" title="Web design">web design</a></div>
<!-- RO Social Bookmarks END --><p><a  href="http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/">MOSS Search and browser languages</a> is a post from: <a  href="http://blog.petergerritsen.nl">Peter Gerritsen&#039;s blog</a></p>
<div class="fblike" style="height:25px; height:25px; overflow:hidden;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.petergerritsen.nl%2F2009%2F02%2F26%2Fmoss-search-and-browser-languages%2F&amp;layout=standard&amp;show_faces=false&amp;width=320&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allow Transparency="true" style="border:none; overflow:hidden; width:320px;"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://blog.petergerritsen.nl/2009/02/26/moss-search-and-browser-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

