<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Microsoft Enterprise Search Blog : Query</title><link>http://blogs.msdn.com/enterprisesearch/archive/tags/Query/default.aspx</link><description>Tags: Query</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>The Search Developer Story in SharePoint 2010 - Query Interfaces</title><link>http://blogs.msdn.com/enterprisesearch/archive/2009/11/20/the-search-developer-story-in-sharepoint-2010-query-interfaces.aspx</link><pubDate>Fri, 20 Nov 2009 23:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9926538</guid><dc:creator>enterprisesearch</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/enterprisesearch/comments/9926538.aspx</comments><wfw:commentRss>http://blogs.msdn.com/enterprisesearch/commentrss.aspx?PostID=9926538</wfw:commentRss><wfw:comment>http://blogs.msdn.com/enterprisesearch/rsscomments.aspx?PostID=9926538</wfw:comment><description>&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3 face=Calibri&gt;SharePoint 2010 includes a number of features that make the platform easier to use for developers. An improved Visual Studio integration, the addition of &lt;/FONT&gt;&lt;/SPAN&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/bb397926.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb397926.aspx"&gt;&lt;FONT size=3 face=Calibri&gt;LINQ&lt;/FONT&gt;&lt;/A&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; to the SharePoint platform, sandboxing for deployment, and the new developer dashboard are just a few examples of how developing and deploying SharePoint solutions have become much easier. &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3 face=Calibri&gt;As a member of the enterprise search development team that has worked to bring FAST Search into SharePoint 2010, I can tell you that a &lt;U&gt;lot&lt;/U&gt; has also been done to benefit developers of search-based solutions. SharePoint 2010 Search and the new &lt;/FONT&gt;&lt;/SPAN&gt;&lt;A href="http://blogs.msdn.com/enterprisesearch/archive/2009/10/28/fast-meets-sharepoint-what-s-coming-in-search-for-sharepoint-2010.aspx" mce_href="http://blogs.msdn.com/enterprisesearch/archive/2009/10/28/fast-meets-sharepoint-what-s-coming-in-search-for-sharepoint-2010.aspx"&gt;&lt;FONT size=3 face=Calibri&gt;FAST Search for SharePoint 2010&lt;/FONT&gt;&lt;/A&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; have been designed to share a common platform so that search developers can integrate with both SharePoint Search and FAST Search for SharePoint 2010 using the same query side interfaces. This means developers don’t have to learn new APIs or programming models, but can leverage the same object models, services and a common query language for both products. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;SharePoint developers and architects implementing search-driven applications should understand the available integration options. Depending on requirements, tools, and preferences, one can choose from among several integration points, including a brand new object model in SharePoint 2010. Here’s a list of the different integration points with a brief description of each:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;&lt;STRONG&gt;The Federation Object Model (OM)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3 face=Calibri&gt;This is a new search object model in SharePoint 2010. It provides a unified interface for querying against different locations (search providers), giving developers of search-driven Web Parts a way to implement end-user experiences that are independent of the underlying search engine. The object model also allows for combining and merging results from different search providers. Out-of-box Web Parts in SharePoint 2010 are based on this OM, and SharePoint 2010 ships with 3 different types of locations; SharePoint Search, FAST Search and &lt;/FONT&gt;&lt;/SPAN&gt;&lt;A href="http://www.opensearch.org/Home" mce_href="http://www.opensearch.org/Home"&gt;&lt;FONT size=3 face=Calibri&gt;OpenSearch&lt;/FONT&gt;&lt;/A&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;. The Federation OM is also extensible, should you want or need to implement a custom search location outside of the supported types. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;&lt;STRONG&gt;The Query Web Service&lt;/STRONG&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;This is the integration point for applications outside of your SharePoint environment, such as standalone, non-web based applications, or Silverlight applications running in a browser. The Query Web Service is a SOAP based ASMX web service, and supports a number of operations, including:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Querying and getting search results&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Getting query suggestions&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Getting meta data, e.g. a list managed properties&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;The same schema is shared for SharePoint Search and FAST Search, and both products support the same operations. For querying, clients can easily switch the search provider by setting a ResultsProvider element in the request XML. A number of extensions are available for FAST Search, e.g. refinement results, advanced sorting using a formula, issuing queries using the FAST Query Language.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="COLOR: #1f497d; mso-fareast-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;The Query RSS Feed&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Certain scenarios, like simple mashups, may need only a simple search result list. The RSS feed is an alternative, lightweight integration point for supplying applications outside of SharePoint with a simple RSS result list. The Search Center - the default search front-end in SharePoint 2010 - includes a link to a query-based RSS feed. Switching the engine to the RSS format is done by simply setting a URL provider. Because of its intended simplicity, there are some limitations to what can be returned and customized in the query RSS feed. The object models or the web service integration scenarios are recommended for more advanced applications.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;&lt;STRONG&gt;The Query Object Model&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;This is the lowest level object model, used by the Federation object model, the Query Web Service and the Query RSS feed. Both SharePoint Search and FAST Search support the KeywordQuery object in this object model. While the Federation OM returns XML (to Web Parts), the Query OM returns data types. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;&lt;STRONG&gt;The Search Web Parts&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #1f497d; mso-fareast-font-family: 'Courier New'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="COLOR: #1f497d"&gt;Search Web Parts in SharePoint 2010 are common in SharePoint Search and FAST Search, and are now based on the common Federation OM&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d; mso-themecolor: text2"&gt;. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;The Web Parts on a page communicate through a shared Query Manager, a central component of the Federation OM. This makes adding new Web Parts that interact with existing Web Parts simpler than before. For example, a new Tag Cloud Web Part for visualizing the query results can utilize the shared Query Manager for getting results.&lt;/SPAN&gt; &lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;Developers will also be able to extend out-of-box Web Parts as they now are public in SharePoint 2010 (no longer sealed).&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="COLOR: #1f497d"&gt; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;&lt;STRONG&gt;The Common Query Language&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Both SharePoint Search and FAST Search support the Keyword Query Language syntax. This is the default query language for both products, and the end-user language supported from the Web Parts in the search centers (including the advanced search page).&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;&lt;STRONG&gt;FAST Search Extensions&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;FAST Search has a number of extensions beyond the standard SharePoint Search that are available on both the Federation and Query object models, and as well as on the query web service. Some examples are:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;The FAST Query Language, which supports advanced query operators like XRANK for dynamic (query time) term weighting and ranking. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Deep refiners over the whole results set, and the possibility of adding refiners over any managed property&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Advanced sorting using managed properties or a query-time sort formula.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;Advanced duplicate trimming, with the ability to specify a custom property on which to base duplicate comparisons.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT face=Calibri&gt;&lt;FONT size=3&gt;“Similar documents” matching.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;FAST Search Admin Object Model for promoting documents or assigning visual best bets to query keywords/phrases. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P style="MARGIN: 0in 0in 0pt 1in" class=MsoListParagraph&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3 face=Calibri&gt;Building powerful search applications is easier than ever in SharePoint 2010. FAST Search is now integrated into the SharePoint platform and developers of search-driven solutions and applications can leverage a common platform and common APIs for both SharePoint Search and FAST Search. This means applications can be built&lt;/FONT&gt;&lt;A title=_GoBack name=_GoBack&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; to support both search engines and then extended if and when desired to take advantage of the more advanced features available with FAST Search, such as dynamic ranking, flexible sort formulae, or deep refiners for insight into your full result set.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Arnt Schøning, Senior Development Engineer | Microsoft Enterprise Search Group&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3 face=Calibri&gt;(o on Twitter as &lt;/FONT&gt;&lt;/SPAN&gt;&lt;A href="http://twitter.com/aschoning" mce_href="http://twitter.com/aschoning"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;@aschoning&lt;/FONT&gt;&lt;/A&gt;&lt;U&gt;&lt;FONT color=#0000ff&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN class=MsoHyperlink&gt;)&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9926538" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Announcements/default.aspx">Announcements</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Query/default.aspx">Query</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/FAST/default.aspx">FAST</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/search/default.aspx">search</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/enterprise+search/default.aspx">enterprise search</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/FAST+Search+for+SharePoint+2010/default.aspx">FAST Search for SharePoint 2010</category></item><item><title>How to: Mine the ULS logs for query latency</title><link>http://blogs.msdn.com/enterprisesearch/archive/2008/09/02/how-to-mine-the-uls-logs-for-query-latency.aspx</link><pubDate>Wed, 03 Sep 2008 02:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8920968</guid><dc:creator>enterprisesearch</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/enterprisesearch/comments/8920968.aspx</comments><wfw:commentRss>http://blogs.msdn.com/enterprisesearch/commentrss.aspx?PostID=8920968</wfw:commentRss><wfw:comment>http://blogs.msdn.com/enterprisesearch/rsscomments.aspx?PostID=8920968</wfw:comment><description>&lt;p mce_keep="true"&gt;Tracking query latencies can be made easier through the use of the products ULS logs.&amp;#160;&amp;#160; Below you will find information on how to enable the specific ULS traces as well as information for how to parse the logs.&amp;#160; The primary usage of this information is to monitor the ongoing health of your system.&amp;#160; It is one tool in the toolbox to make sure that the system is running in a viable state.&amp;#160; It is also necessary when you are making small changes to your environment so you can measure the benefits or detriments of the changes made.&amp;#160; Another key usage of the query latency ULS logs is the ability to where the larger portions of time is being spent in the query.&amp;#160; For example you can see the time spent in SQL improve after doing index defrags.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;b&gt;ULS logging&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Making changes to ULS log settings can impact performance and cause more disk space to be consumed when.&amp;#160; However, the category and level changes mentioned below are what SearchBeta is running with and the cost of this is negligible given the benefit it provides.&amp;#160; Just make sure your logs files are not on a drive that is tight on disk space. &lt;/p&gt;  &lt;p&gt;You will need to change the following ULS settings to get the events that we need traced.&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;From &amp;quot;Central Admin.Operations.Diagnostic Logging&amp;quot; set the following;&amp;#160;&amp;#160; &lt;br /&gt;Category: &amp;quot;MS&amp;#160; Search Query Processor&amp;quot;       &lt;br /&gt;Least critical event to report to the trace log: &amp;quot;High&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;b&gt;LogParser&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;There are a number of interesting traces that you get with the above setting.&amp;#160; To really look at this data you will need to use some kind of log parsing utility to strip out the interesting traces and perform some additional post processing.&amp;#160; I recommend that you use &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&amp;amp;displaylang=en"&gt;logparser.exe &lt;/a&gt;to do this parsing.&amp;#160; Below I give examples of Log Parser queries to get at the data. Additionally you should provide the following input parameters to logparser.exe since the ULS log files are Unicode, tab separated text files.&amp;#160; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;-i:TSV -iCodepage:-1 -fixedSep:ON &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;b&gt;Traces&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;With the above ULS trace settings you will get the following messages in the log (location of these log files can be found in the above UI for changing the logging level):&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;Completed query execution with timings:&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;v1 v2 v3 v4 v5 v6 &lt;/b&gt;      &lt;ul&gt;       &lt;li&gt;The 5 numbers &lt;b&gt;v1,v2,v3,v4,v5&lt;/b&gt;, and&lt;b&gt; v6&lt;/b&gt;&amp;#160; are time&lt;b&gt; &lt;/b&gt;measurements in milliseconds           &lt;ul&gt;           &lt;li&gt;&lt;b&gt;v6&lt;/b&gt; = Cumulated time spent in various&amp;#160; calls to SQL&amp;#160; except the property fetching &lt;/li&gt;            &lt;li&gt;&lt;b&gt;v5&lt;/b&gt; = Time spent waiting for the full-text query results from the query server (TimeSpentInIndex) &lt;/li&gt;            &lt;li&gt;&lt;b&gt;v4&lt;/b&gt; = Latency of the query measured after the joining of index results with the SQL part of the query. This includes &lt;b&gt;v5&lt;/b&gt; and the time spent in SQL for resolving the SQL part of advanced queries (e.g. queries sorted by date or queries including property based restrictions like AND size &amp;gt; 1000). &lt;/li&gt;            &lt;li&gt;&lt;b&gt;v4&lt;/b&gt;-&lt;b&gt;v5&lt;/b&gt;&amp;#160; =&amp;#160; Join tim &lt;/li&gt;            &lt;li&gt;&lt;b&gt;v3&lt;/b&gt; = Latency of the query measured after security trimming. It includes V4 plus retrieval of descriptors form SQL and access check. &lt;/li&gt;            &lt;li&gt;&lt;b&gt;v3&lt;/b&gt;-&lt;b&gt;v4&lt;/b&gt; = Security Trimming tim &lt;/li&gt;            &lt;li&gt;&lt;b&gt;v2&lt;/b&gt; = Latency of the query measured after the duplicate detection. &lt;/li&gt;            &lt;li&gt;&lt;b&gt;v3&lt;/b&gt;-&lt;b&gt;v2&lt;/b&gt; = Duplicate detection tim &lt;/li&gt;            &lt;li&gt;&lt;b&gt;v1&lt;/b&gt; = Total time spent in QP. (TotalQPTime) &lt;/li&gt;            &lt;li&gt;&lt;b&gt;v1&lt;/b&gt; -&lt;b&gt;v2&lt;/b&gt;= Time spent retrieving properties and hit highlighting . (FetchTime) &lt;/li&gt;         &lt;/ul&gt;       &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Join retry&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;v1 v2 v3&lt;/b&gt;       &lt;ul&gt;       &lt;li&gt;Retry caused because there were not enough results from SQL that matched the results returned from the full-text index. &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Security trimming retry&lt;/b&gt;&lt;b&gt; v1 v2 v3 &lt;/b&gt;      &lt;ul&gt;       &lt;li&gt;Caused by the user executing a query the returns a number of results that they do not have permission to read.&amp;#160; The query is retried until the enough results are available to display the first page of results. &lt;b&gt;&lt;/b&gt;&lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;N&lt;strong&gt;ear duplicate removal retry v1 v2 v3&lt;/strong&gt;       &lt;ul&gt;       &lt;li&gt;There were so many virtually identical documents that were trimmed out that the query processor did not have an adequate number of documents to display &lt;/li&gt;        &lt;li&gt;The 3 numbers &lt;b&gt;v1,v2 &lt;/b&gt;and&lt;b&gt; v3 &lt;/b&gt;are counts of documents.&amp;#160; If you see one of these messages in the log it means that the query processor was unable to satisfy the requested number of results on the first attempt and had to execute the SQL portion of the query a second++ time with a larger number of requested results.&amp;#160; The numbers here are not excessively useful and most of the analysis you will do is around the existence of this trace.&amp;#160;&amp;#160; This and the relative frequency of each of the retries allows you to determine why so much time is being spent in a given phase of the query.&amp;#160;&amp;#160;&amp;#160; &lt;ul&gt;           &lt;li&gt;&lt;b&gt;v1&lt;/b&gt; is the current upper bound on the number of documents to work with (this will go up on subsequent retries) &lt;/li&gt;            &lt;li&gt;&lt;b&gt;v2 &lt;/b&gt;is the number of documents before the operation that caused the retry &lt;/li&gt;            &lt;li&gt;&lt;b&gt;v3 &lt;/b&gt;is the number of documents after the operation that caused the retry. &lt;/li&gt;         &lt;/ul&gt;       &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;b&gt;Where is all of the time being spent for the queries executed in the system?&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The answer to this question is primarily within the &amp;quot;Completed query execution…&amp;quot; trace.&amp;#160; The number of retries&amp;#160; help explain why the time spent in any one location is so high.&amp;#160;&amp;#160; Given all of the timing information that&lt;b&gt; &lt;/b&gt;you can get from a single query and the fact that this data is available for each and every query executed, the problem becomes more of an exercise in figuring out how to store the data and provide a mechanism to summarize or chart it.&amp;#160; Without doing this there is just too much data to try and interpret.&amp;#160; The solution we have on SearchBeta is to collect the data on a regular basis (hourly) and import it into a SQL reporting server that is segregated from the SQL machine hosting the Search farm.&lt;/p&gt;  &lt;p&gt;Once the data is in SQL we have created a number of Excel spreadsheets that query the data directly from SQL and chart it using Excel Pivot Tables/Charts.&amp;#160; We have also gone further to provide a set of dashboards within a MOSS system that use Excel Server to provide up to date reports on the health of the system that are available for anyone to look at.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;Once you have the basics of this system set-up there are a multitude of other reports and health monitoring that are possible; from collecting performance counters to mining IIS logs.&amp;#160; The IIS logs provide a key piece of information about query latencies that is missing from the ULS trace.&amp;#160; Primarily answering the question of how much additional time is spent rendering the UI.&lt;/p&gt;  &lt;p&gt;A sample of one of the charts that we are able to produce with the ULS log data is below:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/enterprisesearch/WindowsLiveWriter/HowtoMinetheULSlogsforquerylatency_EA1A/clip_image001_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/enterprisesearch/WindowsLiveWriter/HowtoMinetheULSlogsforquerylatency_EA1A/clip_image001_2.jpg"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://blogs.msdn.com/blogfiles/enterprisesearch/WindowsLiveWriter/HowtoMinetheULSlogsforquerylatency_EA1A/clip_image001_thumb.jpg" width="424" height="338" mce_src="http://blogs.msdn.com/blogfiles/enterprisesearch/WindowsLiveWriter/HowtoMinetheULSlogsforquerylatency_EA1A/clip_image001_thumb.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The log parser query that we use to mine the ULS logs is below.&amp;#160; Note there are number of output options for LogParser, I am using a simple CSV file below.&amp;#160; But you can also import the data directly into SQL. &lt;/p&gt;  &lt;p&gt;*remember the numbers in the log are in milliseconds, the query below translates the time into seconds. &lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;Select&lt;/span&gt;  &lt;span class="kwrd"&gt;Timestamp&lt;/span&gt;
      , TO_INT(Extract_token(Message,7, &lt;span class="str"&gt;' '&lt;/span&gt;)) &lt;span class="kwrd"&gt;as&lt;/span&gt; TotalQPTime
      , TO_INT(Extract_token(Message,8, &lt;span class="str"&gt;' '&lt;/span&gt;)) &lt;span class="kwrd"&gt;as&lt;/span&gt; v2
      , TO_INT(Extract_token(Message,9, &lt;span class="str"&gt;' '&lt;/span&gt;)) &lt;span class="kwrd"&gt;as&lt;/span&gt; v3
      , TO_INT(Extract_token(Message,10, &lt;span class="str"&gt;' '&lt;/span&gt;)) &lt;span class="kwrd"&gt;as&lt;/span&gt; v4
      , TO_INT(Extract_token(Message,11, &lt;span class="str"&gt;' '&lt;/span&gt;)) &lt;span class="kwrd"&gt;as&lt;/span&gt; TimeSpentInIndex
      , TO_INT(Extract_token(Message,12, &lt;span class="str"&gt;' '&lt;/span&gt;)) &lt;span class="kwrd"&gt;as&lt;/span&gt; v6
      , SUB(v4, TimeSpentInIndex) &lt;span class="kwrd"&gt;as&lt;/span&gt; JoinTime
      , SUB(v3, v4) &lt;span class="kwrd"&gt;as&lt;/span&gt; SecurityTrimmingTime
      , &lt;span class="kwrd"&gt;CASE&lt;/span&gt; v2
            &lt;span class="kwrd"&gt;WHEN&lt;/span&gt; 0 &lt;span class="kwrd"&gt;THEN&lt;/span&gt; 0 
            &lt;span class="kwrd"&gt;ELSE&lt;/span&gt; SUB(v2, v3) 
        &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;as&lt;/span&gt; DuplicateDetectionTime
      , SUB(TotalQPTime, v2) &lt;span class="kwrd"&gt;as&lt;/span&gt; FetchTime
&lt;span class="kwrd"&gt;INTO&lt;/span&gt; QTiming
&lt;span class="kwrd"&gt;FROM&lt;/span&gt; &lt;a href="file://%25wfehost%25/ULSlogs/%25wfeHost%25*.logWHERE" mce_href="file://\\%wfeHost%\ULSlogs\%wfeHost%*.logWHERE"&gt;\\%wfeHost%\ULSlogs\%wfeHost%*.log
&lt;span class="kwrd"&gt;WHERE&lt;/a&gt;&lt;/span&gt; Category = &lt;span class="str"&gt;'MS Search Query Processor'&lt;/span&gt; 
      &lt;span class="kwrd"&gt;AND&lt;/span&gt; Message &lt;span class="kwrd"&gt;LIKE&lt;/span&gt; &lt;span class="str"&gt;'%Completed query execution with timings:%'&lt;/span&gt; &lt;/pre&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;*FYI -- Prior to the MSS release and Infrastructure Update updating MOSS with the MSS changes, the first two &amp;quot;tokens&amp;quot; (QueryID: XXX.) at the beginning of the trace did not exist.&amp;#160; So you will need to subtract 2 from the second parameter of each &amp;quot;Extract_token&amp;quot; predicate in the above SQL command. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;What is the percentage of retries that the system has?&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;To get an idea for how many &amp;quot;retries&amp;quot; are occurring you need to correlate the number of retries with the number of queries executed and calculate a % of total retry values for each type of retry.&amp;#160; The timing data above does include time spent in a retry.&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;

&lt;p&gt;Log Parser queries: &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Total number of queries executed &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; &lt;span class="kwrd"&gt;count&lt;/span&gt; (Message) 
&lt;span class="kwrd"&gt;FROM&lt;/span&gt; *.log 
&lt;span class="kwrd"&gt;WHERE&lt;/span&gt; Category = &lt;span class="str"&gt;'MS Search Query Processor'&lt;/span&gt; &lt;span class="kwrd"&gt;and&lt;/span&gt; Message &lt;br /&gt;&lt;span class="kwrd"&gt;like&lt;/span&gt; &lt;span class="str"&gt;'%Completed query execution%'&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;ul&gt;
  &lt;li&gt;Total number of retries due to Security trimming &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; &lt;span class="kwrd"&gt;count&lt;/span&gt; (Message) 
&lt;span class="kwrd"&gt;FROM&lt;/span&gt; *.log 
&lt;span class="kwrd"&gt;WHERE&lt;/span&gt; Category = &lt;span class="str"&gt;'MS Search Query Processor'&lt;/span&gt; &lt;span class="kwrd"&gt;and&lt;/span&gt; Message &lt;br /&gt;&lt;span class="kwrd"&gt;like&lt;/span&gt; &lt;span class="str"&gt;'%Security trimming retry%'&lt;/span&gt; &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;ul&gt;
  &lt;li&gt;Total number of retries due to Join retries &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; &lt;span class="kwrd"&gt;count&lt;/span&gt; (Message) 
&lt;span class="kwrd"&gt;FROM&lt;/span&gt; *.log 
&lt;span class="kwrd"&gt;WHERE&lt;/span&gt; Category = &lt;span class="str"&gt;'MS Search Query Processor'&lt;/span&gt; &lt;span class="kwrd"&gt;and&lt;/span&gt; Message &lt;br /&gt;&lt;span class="kwrd"&gt;like&lt;/span&gt; &lt;span class="str"&gt;'%Join retry%'&lt;/span&gt; &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;ul&gt;
  &lt;li&gt;Total number of retries due to Duplicate Removal &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; &lt;span class="kwrd"&gt;count&lt;/span&gt; (Message) 
&lt;span class="kwrd"&gt;FROM&lt;/span&gt; *.log 
&lt;span class="kwrd"&gt;WHERE&lt;/span&gt; Category = &lt;span class="str"&gt;'MS Search Query Processor'&lt;/span&gt; &lt;span class="kwrd"&gt;and&lt;/span&gt; Message &lt;br /&gt;&lt;span class="kwrd"&gt;like&lt;/span&gt; &lt;span class="str"&gt;'%Near duplicate removal retry%'&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Thank you for your time and as always I welcome any feedback or questions&lt;/p&gt;

&lt;p&gt;Dan Blood 
  &lt;br /&gt;Senior Test&amp;#160; Engineer 

  &lt;br /&gt;Microsoft Corp&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8920968" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Query/default.aspx">Query</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/ITPro/default.aspx">ITPro</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Perf+_2600_+Scale/default.aspx">Perf &amp; Scale</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Results/default.aspx">Results</category></item><item><title>Understanding Total Hits &amp; Paging in the MOSS 2007 Search API</title><link>http://blogs.msdn.com/enterprisesearch/archive/2008/05/22/understanding-total-hits-paging-in-the-moss-2007-search-api.aspx</link><pubDate>Thu, 22 May 2008 21:45:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8533148</guid><dc:creator>enterprisesearch</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/enterprisesearch/comments/8533148.aspx</comments><wfw:commentRss>http://blogs.msdn.com/enterprisesearch/commentrss.aspx?PostID=8533148</wfw:commentRss><wfw:comment>http://blogs.msdn.com/enterprisesearch/rsscomments.aspx?PostID=8533148</wfw:comment><description>&lt;p&gt;One of the more discussed topics I&amp;#8217;ve seen (and struggled with myself) is around the concept of obtaining the total number of hits in a search results when working with the MOSS API. For instance, when I search for &amp;#8220;sales forecast&amp;#8221; in my SharePoint site, I want to not only see a set of paged results, 10 hits per page, but also see that my search found 127 matches. Those of you who&amp;#8217;ve worked with the SharePoint Search Web Parts know this is a piece of cake using the Search Core Results, Search Paging and Search Statistics Web Parts. &lt;/p&gt;  &lt;p&gt;But what if you need to roll your own solution? How can you get the same data out of your search query using the MOSS 2007 Search API? At first this can be a bit tricky but this post will hopefully show you how to knock it down to being a trivial task.&lt;/p&gt;  &lt;p&gt;Executing a search query against the SharePoint API has you working with two objects that implement the abstract class &lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.query.query.aspx"&gt;&lt;b&gt;Microsoft.Office.Server.Search.Query.Query&lt;/b&gt;&lt;/a&gt;: &lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.query.keywordquery"&gt;&lt;b&gt;Microsoft.Office.Server.Search.Query.KeywordQuery&lt;/b&gt;&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.query.fulltextsqlquery.aspx"&gt;&lt;b&gt;Microsoft.Office.Server.Search.Query.FullTextSqlQuery&lt;/b&gt;&lt;/a&gt;. The former &lt;b&gt;KeywordQuery&lt;/b&gt; is useful for simple queries whereas the latter &lt;b&gt;FullTextSqlQuery&lt;/b&gt; is much more powerful. Both implement the &lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.query.query.execute.aspx"&gt;&lt;b&gt;Execute()&lt;/b&gt;&lt;/a&gt; method which executes the defined query and returns back a collection of results as type &lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.query.resulttablecollection.aspx"&gt;&lt;b&gt;Microsoft.Office.Server.Search.Query.ResultTableCollection&lt;/b&gt;&lt;/a&gt;. Using this object, you can get the specific results you are interested in. For instance to get the relevant results use the following to get an instance of a specific &lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.query.resulttable.aspx"&gt;&lt;b&gt;Microsoft.Office.Server.Search.Query.ResultTable&lt;/b&gt;&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;using (FullTextSqlQuery query = new FullTextSqlQuery(SPContext.Current.Site))&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;{&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;query.QueryText = &amp;quot;SELECT Rank, Title Url FROM Scope() WHERE FREETEXT(defaultproperties,'sales proposal') ORDER BY Rank Desc&amp;quot;,&lt;/p&gt;    &lt;p&gt;ResultTableCollection results = query.Execute();&lt;/p&gt;    &lt;p&gt;ResultTable relevantResults = results[ResultType.RelevantResults];&lt;/p&gt;    &lt;p&gt;// do work with the results&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;}&lt;/p&gt;  &lt;p&gt;Simple enough, but the project requires much more than that as usual. What we need to do is page the results to show only 15 items per page. No problem&amp;#8230; let&amp;#8217;s just modify that query a bit to set the &lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.query.query.startrow.aspx"&gt;&lt;b&gt;Query.StartRow&lt;/b&gt;&lt;/a&gt; &amp;amp; &lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.query.query.rowlimit.aspx"&gt;&lt;b&gt;Query.RowLimit&lt;/b&gt;&lt;/a&gt; properties of the query to say what page we&amp;#8217;re on and tell SharePoint how many results we want to get back. Take for instance if we&amp;#8217;re on page 2 of the results&amp;#8230; we want to start with the 16&lt;sup&gt;th&lt;/sup&gt; hit as 1-15 were on page 1:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;using (FullTextSqlQuery query = new FullTextSqlQuery(SPContext.Current.Site))&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;{&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;query.StartRow = 16;&lt;/p&gt;    &lt;p&gt;query.RowLimit = 15;&lt;/p&gt;    &lt;p&gt;query.QueryText = &amp;quot;SELECT Rank, Title Url FROM Scope() WHERE FREETEXT(defaultproperties,'sales proposal') ORDER BY Rank Desc&amp;quot;,&lt;/p&gt;    &lt;p&gt;ResultTableCollection results = query.Execute();&lt;/p&gt;    &lt;p&gt;ResultTable relevantResults = results[ResultType.RelevantResults];&lt;/p&gt;    &lt;p&gt;// do work with the results&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;}&lt;/p&gt;  &lt;p&gt;Again&amp;#8230; pretty straight forward. Now is where it gets a bit tricky. You need to show links to provide paging&amp;#8230; but in order to do that you need a good idea what the total reset set of your search query because if there were only 43 hits, you don&amp;#8217;t want to shot options to jump to page 9. The property that gives you the number you&amp;#8217;re looking for is &lt;b&gt;ResultTable.TotalResults&lt;/b&gt;. Now there&amp;#8217;s something special about this guy: he doesn&amp;#8217;t give you an exact number&amp;#8230; he gives you an &lt;i&gt;estimate&lt;/i&gt;. Why an estimate? Quite simply, with all the security trimming and other complex logic inherit to search algorithms, it&amp;#8217;s just too expensive to get a specific number. Sites like Live.com can do this because they don&amp;#8217;t have to concern themselves with the security trimming of hits.&lt;/p&gt;  &lt;p&gt;But this is not all&amp;#8230; there&amp;#8217;s another property you should pay attention to: &lt;a href="http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.query.query.totalrowsexactminimum.aspx"&gt;&lt;b&gt;Query.TotalRowsExactMinimum&lt;/b&gt;&lt;/a&gt;. This property tells SharePoint this is the minimum number of hits to be included in the search. It&amp;#8217;s used to generate the estimate of total results. Think of it like a hint to search&amp;#8230; saying &amp;#8220;you only have to work this hard on this query.&amp;#8221; Most search implementations only show the next few paging options&amp;#8230; they don&amp;#8217;t show ALL the options. For instance, if you&amp;#8217;re on page 5, your paging control may show the following:&lt;/p&gt;  &lt;p&gt;&amp;#171;Previous&amp;#171; 2 3 4 5 6 7 8 &amp;#187;Next&amp;#187;&lt;/p&gt;  &lt;p&gt;In this case, you don&amp;#8217;t need for search to find ALL the results&amp;#8230; you only need it to determine how many more page options you want to show to see if you&amp;#8217;re going to show too many or too few. In the above example, you have an additional 3 pages of results you want to show. Continuing on this example, you have a result set of 15 and you have an additional 3 pages you want to show, the &lt;b&gt;Query.TotalResultsExactMinimum&lt;/b&gt; property would be 45 as it already is going to factor into the equation the &lt;b&gt;Query.StartRow&lt;/b&gt; property:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;using (FullTextSqlQuery query = new FullTextSqlQuery(SPContext.Current.Site))&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;{&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;query.StartRow = 16;&lt;/p&gt;    &lt;p&gt;query.RowLimit = 15;&lt;/p&gt;    &lt;p&gt;// TotalRowsExactMinimum = [number of pages to show] * [page size]&lt;/p&gt;    &lt;p&gt;query.TotalRowsExactMinimum = 45;&lt;/p&gt;    &lt;p&gt;query.QueryText = &amp;quot;SELECT Rank, Title Url FROM Scope() WHERE FREETEXT(defaultproperties,'sales proposal') ORDER BY Rank Desc&amp;quot;,&lt;/p&gt;    &lt;p&gt;ResultTableCollection results = query.Execute();&lt;/p&gt;    &lt;p&gt;ResultTable relevantResults = results[ResultType.RelevantResults];&lt;/p&gt;    &lt;p&gt;// do work with the results&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;}&lt;/p&gt;  &lt;p&gt;That&amp;#8217;s all there really is to it! One parting word of advice: use the &lt;b&gt;Query.TotalRowsExactMinimum&lt;/b&gt; property with care as the higher its set, the greater performance impact there will be on each search query executed.&lt;/p&gt;  &lt;p&gt;A special shout out &amp;amp; thanks to Puneet Narula @ Microsoft for helping uncover this very helpful nugget of info.&lt;/p&gt;  &lt;p&gt;Andrew Connell (&lt;a href="http://www.andrewconnell.com/blog/"&gt;blog&lt;/a&gt;)     &lt;br /&gt;&lt;a href="https://mvp.support.microsoft.com/default.aspx/profile/andrew.connell" target="_blank"&gt;Microsoft MVP&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8533148" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Query/default.aspx">Query</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Express/default.aspx">Express</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Search+Server/default.aspx">Search Server</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Samples/default.aspx">Samples</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Results/default.aspx">Results</category></item><item><title>Search Relevance Tuning</title><link>http://blogs.msdn.com/enterprisesearch/archive/2008/05/14/search-relevance-tuning.aspx</link><pubDate>Thu, 15 May 2008 03:37:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8505662</guid><dc:creator>enterprisesearch</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/enterprisesearch/comments/8505662.aspx</comments><wfw:commentRss>http://blogs.msdn.com/enterprisesearch/commentrss.aspx?PostID=8505662</wfw:commentRss><wfw:comment>http://blogs.msdn.com/enterprisesearch/rsscomments.aspx?PostID=8505662</wfw:comment><description>&lt;p&gt;Changing the advanced relevance settings for Search Server 2008 and SharePoint Server 2007 (such as the global ranking parameters, property weights and property length normalization) isn't something that you'll want to do without a lot of thought, planning and testing.&lt;/p&gt;  &lt;p&gt;And in the vast majority of cases you'll never need to go near the settings, but in certain specialized deployment scenarios it might be something you want to consider. &lt;/p&gt;  &lt;p&gt;This &lt;a href="http://msdn.microsoft.com/en-us/library/bb499682.aspx" target="_blank"&gt;MSDN article&lt;/a&gt; and &lt;a href="http://go.microsoft.com/fwlink/?LinkId=108874&amp;amp;clcid=0x409" target="_blank"&gt;TechNet White Paper&lt;/a&gt; give you a very detailed review of the relevance knobs and wheels you can turn along with how to structure and plan your testing to see if you're achieving your desired end result.&lt;/p&gt;  &lt;p&gt;To help you on your way, Christopher Even (&lt;a href="http://www.sharepointsearch.com"&gt;http://www.sharepointsearch.com&lt;/a&gt;) has written and shared on CodePlex a small utility that allows you to change all of the advanced relevance settings quickly and easily.&lt;/p&gt;  &lt;p&gt;The tool is &lt;a href="http://www.codeplex.com/searchrelevancy" target="_blank"&gt;here&lt;/a&gt; and is part of the &lt;a href="http://www.codeplex.com/sct" target="_blank"&gt;Search Community Toolkit&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;This tool comes with a relevance health warning:&lt;/strong&gt; Read the &lt;a href="http://msdn.microsoft.com/en-us/library/bb499682.aspx" target="_blank"&gt;MSDN&lt;/a&gt; and &lt;a href="http://go.microsoft.com/fwlink/?LinkId=108874&amp;amp;clcid=0x409" target="_blank"&gt;TechNet&lt;/a&gt; content before you start, use the tool with care, make a note of all of the values that you change before you change them and ensure you're consistent and diligent in your relevance testing after you make any changes!&lt;/p&gt;  &lt;p&gt;There's nothing that the tool does that can't be done though the search object model, it just saves you having to write code to tune the various advanced parameters.&lt;/p&gt;  &lt;p&gt;Richard Riley    &lt;br /&gt;Senior Technical Product Manager     &lt;br /&gt;Microsoft Corp&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8505662" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Query/default.aspx">Query</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/ITPro/default.aspx">ITPro</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Tools/default.aspx">Tools</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Results/default.aspx">Results</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Ranking/default.aspx">Ranking</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Relevance/default.aspx">Relevance</category></item><item><title>Add Virtual Earth Interactive Maps to your Search Server Site</title><link>http://blogs.msdn.com/enterprisesearch/archive/2008/04/01/add-virtual-earth-interactive-maps-to-your-search-server-site.aspx</link><pubDate>Wed, 02 Apr 2008 00:40:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8349022</guid><dc:creator>enterprisesearch</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/enterprisesearch/comments/8349022.aspx</comments><wfw:commentRss>http://blogs.msdn.com/enterprisesearch/commentrss.aspx?PostID=8349022</wfw:commentRss><wfw:comment>http://blogs.msdn.com/enterprisesearch/rsscomments.aspx?PostID=8349022</wfw:comment><description>&lt;p&gt;Are you trying to think of ways to make your Search Server site more interactive and graphical? You can use Federation as a way to enhance the functionality of your search result pages.&lt;/p&gt;  &lt;p&gt;The Federated Search Web Part makes it possible to display more than results from OpenSearch (1.0/1.1) sites on your search results page. The &lt;a href="http://msdn2.microsoft.com/en-us/library/bb931097.aspx"&gt;Search Server 2008 SDK&lt;/a&gt; explains how to include &lt;a href="http://msdn2.microsoft.com/en-us/library/bb896017.aspx"&gt;results from SQL Server database queries&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-us/library/cc299447.aspx"&gt;search sites that do not expose XML feeds&lt;/a&gt; (such as Atom or RSS). In both scenarios, you do this by means of a &amp;quot;connector,&amp;quot; a light-weight interface that sends queries to a given location or database, places the results into a structured XML document, and sends that XML to a Federated Search Web Part.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;This sample demonstrates how you can extend the connector concept to Web service requests other than basic search queries. It shows how to use a connector to pass an address string to &lt;a href="http://msdn2.microsoft.com/en-us/library/aa286513.aspx"&gt;Microsoft's MapPoint Web service&lt;/a&gt; in order to obtain the latitude and longitude coordinates for that address. Once you have those coordinates, displaying a Microsoft Virtual Earth map requires only the addition of some Javascript to your Federated Location definition file. See this &lt;a href="http://www.codeplex.com/sctfscve"&gt;&lt;strong&gt;Codeplex project&lt;/strong&gt;&lt;/a&gt; for the sample code (along with a sample Federated location definition file) and an explanation of how to implement it on your own site.&lt;/p&gt;  &lt;p&gt;This sample is part of the &lt;a href="http://www.codeplex.com/sct"&gt;&lt;strong&gt;Search Community Toolkit&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/enterprisesearch/WindowsLiveWriter/AddVirtualEarthInteractiveMapstoyourSear_CE51/VirtualEarthFederation_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="329" alt="VirtualEarthFederation" src="http://blogs.msdn.com/blogfiles/enterprisesearch/WindowsLiveWriter/AddVirtualEarthInteractiveMapstoyourSear_CE51/VirtualEarthFederation_thumb.jpg" width="261" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Jim Crowley   &lt;br /&gt;Programming Writer    &lt;br /&gt;Microsoft Corp&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8349022" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Query/default.aspx">Query</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/WebService/default.aspx">WebService</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Connectivity/default.aspx">Connectivity</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Search+Server/default.aspx">Search Server</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Samples/default.aspx">Samples</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Documentation/default.aspx">Documentation</category></item><item><title>Helper Classes for the SharePoint Server 2007 Search Query Web Service </title><link>http://blogs.msdn.com/enterprisesearch/archive/2007/10/02/helper-classes-for-the-sharepoint-server-2007-search-query-web-service.aspx</link><pubDate>Wed, 03 Oct 2007 05:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5251691</guid><dc:creator>enterprisesearch</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/enterprisesearch/comments/5251691.aspx</comments><wfw:commentRss>http://blogs.msdn.com/enterprisesearch/commentrss.aspx?PostID=5251691</wfw:commentRss><wfw:comment>http://blogs.msdn.com/enterprisesearch/rsscomments.aspx?PostID=5251691</wfw:comment><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;BR&gt;Sometimes, things just kind of grab hold of you, don't they?&amp;nbsp; A corridor conversation leads to quickly popping into a meeting to give a bit of advice, and this leads to suddenly being given actions.&amp;nbsp; And then, the sense of responsibility kicks in and you find yourself going the extra mile and coding something up to help make something easy.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;It happened that way when I bumped into a colleague who was just going into a meeting.&amp;nbsp; When the conversation turned to what he was doing, he mentioned that he was going into a meeting to discuss an internal project.&amp;nbsp; It was nothing fancy or super-secret; in fact, it was a problem that I've been helping businesses with for the last few years.&amp;nbsp; We have a series of community sites that are maintained by our technical team leads and subject matter experts.&amp;nbsp; One of our senior managers wanted a single mechanism by which everyone could search all this content as well as publishing information that was relevant to the whole group.&amp;nbsp; I quickly gave my standard "information portal coupled with enterprise search" speech and found myself invited to the meeting to repeat it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;So, I found myself helping out.&amp;nbsp; One of the neat ideas was to use the search capability as an internal research and training exercise so that folks could play with developing a simple Silverlight application.&amp;nbsp; No problem, I thought.&amp;nbsp; This is going to be easy for me as all I have to do is set up the site, configure the search to crawl the team site, and the Silverlight developers can invoke the search web service.&amp;nbsp; I could get the job done with minimum effort and maximum kudos.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Then the sense of responsibility kicked in.&amp;nbsp; As I looked at the search web service, I realised that it would be really helpful if I gave the Silverlight developers a set of helper classes.&amp;nbsp; These helper classes would make it easier for them to submit a query without having to worry about building XML query documents and invoking web services.&amp;nbsp; After a few trials and errors, I ended up with three main classes: QueryRequest, QueryResponse, and MossQuery. &amp;nbsp;The QueryRequest class is used to define the query that will be fired in, MossQuery actually invokes the Search web service and it massages the result to build a QueryResponse.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;FONT face=Calibri size=3&gt;And then I thought, "Hey, I bet other folks could make use of these classes …"&amp;nbsp; So &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/bb852171.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb852171.aspx"&gt;&lt;FONT face=Calibri size=3&gt;I wrote an MSDN article&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; that walked through the code and explained how it all worked.&amp;nbsp; &lt;/FONT&gt;&lt;A href="http://www.codeplex.com/MossSrchWs" mce_href="http://www.codeplex.com/MossSrchWs"&gt;&lt;FONT face=Calibri size=3&gt;I popped the project up on Codeplex&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; and was then invited to write an entry to announce it here.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;So, let me know how it goes, and if the code is useful.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-GB style="mso-ansi-language: EN-GB"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;And if I bump into another colleague, perhaps there'll be another little coding project for me somewhere else ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Callum Shillan&lt;BR&gt;Solution Architect&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face=Calibri size=3&gt;Microsoft Consulting Services UK&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5251691" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Query/default.aspx">Query</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/Developer/default.aspx">Developer</category><category domain="http://blogs.msdn.com/enterprisesearch/archive/tags/WebService/default.aspx">WebService</category></item></channel></rss>