{"id":565,"date":"2009-10-20T22:03:01","date_gmt":"2009-10-20T22:03:01","guid":{"rendered":"http:\/\/refraction.co.uk\/blog\/?p=565"},"modified":"2009-10-22T20:15:08","modified_gmt":"2009-10-22T20:15:08","slug":"integrating-enterprise-search-into-windows-7","status":"publish","type":"post","link":"https:\/\/refraction.co.uk\/blog\/2009\/10\/20\/integrating-enterprise-search-into-windows-7\/","title":{"rendered":"Integrating Enterprise Search into Windows 7"},"content":{"rendered":"<p>One of the things I like about Vista and Windows 7 is the way search has been integrated into almost every part of the interface.\u00a0 Sure it\u2019s not something you immediately start using, but for me at least it\u2019s really grown into something that I use more than once a day to help find information and save me time.<\/p>\n<p>On top of the ability to search the local disk, one of the great things about the Vista\/2008\/7\/R2 windows family is the ability to federate search across a number of sources.\u00a0<\/p>\n<p>What does that mean?\u00a0 Search federation allows Windows to query against remote data stores without the need to index those locations itself.\u00a0 Imagine that you wanted to search your SharePoint sites for a document, and you wanted to do it from within Windows.\u00a0 One way to do this would be to get Windows to index all of the SharePoint content and keep its own index.\u00a0\u00a0 That\u2019s not very efficient though, if there is more than one computer each one would need a copy, so in an enterprise that\u2019s a whole lot of duplication.\u00a0<\/p>\n<p>With federated search you enter your search query in one place, in this case Windows, and that query is then forwarded on to the other systems which have indexed content.\u00a0 They then execute the query against their own index and send back the results.\u00a0 Those results are then displayed back in the original application as if they were searched and indexed locally.\u00a0 The benefit of this is that it\u2019s much more efficient, each source can have it\u2019s own index and search tool (provided it supports federation of searching) and only the query and results are passed over the network.<\/p>\n<p>So, how do we make use of this?\u00a0 Well Windows 7 supports search federation in the form of OpenSearch.\u00a0 Fortunately quite a few different search engines support this, but for the sake of this post I\u2019ll use SharePoint as I\u2019m guessing that one of the more common data sources people will want to search.\u00a0<\/p>\n<p><strong>What it looks like<br \/>\n<\/strong>Before I get into how this can be setup and configured, here\u2019s a screenshot of what it looks like in action:<\/p>\n<p><a href=\"https:\/\/refraction.co.uk\/blog\/wp-content\/uploads\/2009\/10\/SharePointSearchinWindows71.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"SharePoint Search in Windows 7\" src=\"https:\/\/refraction.co.uk\/blog\/wp-content\/uploads\/2009\/10\/SharePointSearchinWindows7_thumb1.jpg\" border=\"0\" alt=\"SharePoint Search in Windows 7\" width=\"449\" height=\"307\" \/><\/a><\/p>\n<p>This is a screenshot from Windows Explorer on a Win7 a test machine I was using today. First you can see that there\u2019s an addition to the Favourites for your new search.\u00a0 When you enter something into the search box, the results from the SharePoint location are returned directly into Explorer Window.\u00a0 If you select one of the files and have the preview pane turned on you get a live preview of the document (the preview pane is something else I really find useful!).<\/p>\n<p>In addition to the view above, you can pin your new search to the bottom of any other results\u2026 but more on that later.<\/p>\n<p>So how do you set this up?\u00a0 Well there\u2019s the manual setup and an automated setup using Active Directory Group Policy.<\/p>\n<p><strong>The Manual Way<\/strong><br \/>\nFor manually setting up a new search location you can create a new OpenSearch Description file which you can then double click to install.\u00a0 An OpenSearch Description file (.osdx) is an XML document that tells Windows where to send the search terms and how the results should be formatted.\u00a0 These are fully document here, but I\u2019ve included an example below:<\/p>\n<p align=\"left\">\n<div id=\"codeSnippetWrapper\" style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\">\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span id=\"lnum1\" style=\"color: #606060\">   1:<\/span> &lt;?xml version=<span style=\"color: #006080\">\"1.0\"<\/span> encoding=<span style=\"color: #006080\">\"UTF-8\"<\/span>?&gt;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span id=\"lnum2\" style=\"color: #606060\">   2:<\/span> &lt;OpenSearchDescription xmlns=<span style=\"color: #006080\">\"http:\/\/a9.com\/-\/spec\/opensearch\/1.1\/\"<\/span> xmlns:ms-ose=<span style=\"color: #006080\">\"http:\/\/schemas.microsoft.com\/opensearchext\/2009\/\"<\/span>&gt;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span id=\"lnum3\" style=\"color: #606060\">   3:<\/span> &lt;ShortName&gt;SharePoint Search&lt;\/ShortName&gt;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span id=\"lnum4\" style=\"color: #606060\">   4:<\/span> &lt;Description&gt;Search SharePoint&lt;\/Description&gt;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span id=\"lnum5\" style=\"color: #606060\">   5:<\/span> &lt;Url type=<span style=\"color: #006080\">\"application\/rss+xml\"<\/span> template=<span style=\"color: #006080\">\"http:\/\/yoursharepointsite.com\/searchcentre\/_layouts\/srchrss.aspx?k={searchTerms}&amp;amp;start={startIndex}&amp;amp;cnt={count}\"<\/span>\/&gt;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span id=\"lnum6\" style=\"color: #606060\">   6:<\/span> &lt;Url type=<span style=\"color: #006080\">\"text\/html\"<\/span> template=<span style=\"color: #006080\">\"http:\/\/yoursharepointsite.com\/searchcentre\/Pages\/Results.aspx?k={searchTerms}&amp;amp;page={startPage}&amp;amp;cnt={count}\"<\/span>\/&gt;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span id=\"lnum7\" style=\"color: #606060\">   7:<\/span> &lt;ms-ose:ResultsProcessing format=<span style=\"color: #006080\">\"application\/rss+xml\"<\/span>&gt;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span id=\"lnum8\" style=\"color: #606060\">   8:<\/span> &lt;ms-ose:LinkIsFilePath&gt;-1&lt;\/ms-ose:LinkIsFilePath&gt;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span id=\"lnum9\" style=\"color: #606060\">   9:<\/span> &lt;\/ms-ose:ResultsProcessing&gt;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span id=\"lnum10\" style=\"color: #606060\">  10:<\/span> &lt;\/OpenSearchDescription&gt;<\/pre>\n<p><!--CRLF--><\/div>\n<\/div>\n<p>When you double click on this .osdx file, Windows uses the information it contains to create two new files.\u00a0 The first is a Search Connector (a .searchconnector-ms file) in the \u201c%userprofile%\/searches\u201d directory, and the second is a shortcut to it in the \u201c%userprofile%\/links\u201d directory.\u00a0\u00a0 It\u2019s this shortcut that appears in the \u2018Favorites\u2019 folder in to Screenshot above.<\/p>\n<p><strong>The Automated Way<\/strong><\/p>\n<p>The simplest way to deploy the new search settings out to a number of computers is though Group Policy.\u00a0<\/p>\n<p>As the search config is stored within the Search Connector, all you need to do is deploy the .searchcconnector-ms file and shortcut out to your target computers.\u00a0 There are a few ways to do this, but personally I\u2019d use <a title=\"Group Policy Preferences \" href=\"https:\/\/refraction.co.uk\/blog\/2008\/04\/04\/group-policy-preferences\/\" target=\"_blank\">Group Policy Preferences<\/a>.\u00a0 This will give you a good level of control over the targeting of the files, and easily allow you to adjust the settings over time.\u00a0 You could also use things like logon scripts.<\/p>\n<p>You can configure Group Policy Preferences to deploy files with the <em>User Configuration<\/em> &gt; <em>Preferences<\/em> &gt; <em>Windows Settings<\/em> &gt;<em> Files<\/em> area of a GPO.\u00a0 You\u2019ll have to do this as a user based policy as the files must be copied into the User Profile, if you copied the files as a computer policy it would apply before a user was logged on so they would end up in the wrong place.<\/p>\n<p>Within the Files Preferences, you have to specify a source file location and a target location.\u00a0 For the source location I would tend to use the Netlogon share for your domain (\/\/domain.com\/netlogon\/) as a copy will be on every domain controller and usually therefore local to the end users.\u00a0 The target locations should be the same as those described in the manual steps above:<\/p>\n<p>Search Connector: <span style=\"color: #ff8000;\">%userprofile%\/searches\/<em>File<\/em>.searchconnector-ms<\/span><\/p>\n<p>Shortcut: <span style=\"color: #ff8000;\">%userprofile%\/links\/<em>SearchTitle<\/em>.lnk<\/span><\/p>\n<p>As well as the source and target info, you also need to set a few of the other options.\u00a0 The first is \u2018<em>Run in logged on user\u2019s security context (user policy option)<\/em>\u2019 as this will ensure that the file is copied in context of the user logging on.\u00a0<\/p>\n<p>You may also wish to consider whether to set the \u2018<em>Remove this item when it is no longer applied<\/em>\u2019 options so that the files are removed if you decide to remove the policy.<\/p>\n<p><strong>Adding Links to Your Search Connector<\/strong><\/p>\n<p>Following the steps above will add your new search location into the Favourites folder and allow you to search against it.\u00a0 You can however also add your new Search Connector to both the \u2018Search Again\u2019 links that appear at the bottom of any search results, and to the Start Menu.\u00a0 This is done by configuring the \u2018<em>Pin Libraries or Search Connectors to the \u2018Search Connectors\u2019 to the \u2018Search Again\u2019 links and the Start Menu<\/em>\u2019 Group Policy that can be found within the <em>User Configuration<\/em> &gt; <em>Policies<\/em> &gt; <em>Administrative Templates<\/em> &gt; <em>Windows Components<\/em> &gt; <em>Windows Explorer<\/em> area.<\/p>\n<p>I hope this has been useful!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With Federated Search Windows 7 can use remote enterprise search solutions such as SharePoint using OpenSearch.  This guide shows how to configure this with Active Directory Group Policy Preferences<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,4],"tags":[102,35,61,112,13,100,48,179],"class_list":["post-565","post","type-post","status-publish","format-standard","hentry","category-tech","category-work","tag-active-directory","tag-enterprise","tag-group-policy","tag-how-to","tag-microsoft","tag-search","tag-sharepoint","tag-windows-7","entry"],"_links":{"self":[{"href":"https:\/\/refraction.co.uk\/blog\/wp-json\/wp\/v2\/posts\/565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/refraction.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/refraction.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/refraction.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/refraction.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=565"}],"version-history":[{"count":2,"href":"https:\/\/refraction.co.uk\/blog\/wp-json\/wp\/v2\/posts\/565\/revisions"}],"predecessor-version":[{"id":570,"href":"https:\/\/refraction.co.uk\/blog\/wp-json\/wp\/v2\/posts\/565\/revisions\/570"}],"wp:attachment":[{"href":"https:\/\/refraction.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/refraction.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/refraction.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}