Search Your Internal Site From Internet Explorer

You can use Internet Explorer 7's search box to search almost anything, and you can enable visitors to your site to do the same.

Here's how:

  1. Create an OpenSearch XML Document such as the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
      <ShortName>Search Westin's Technical Log</ShortName>
      <Description>A filter search of all of Westin's technical blog.</Description>
      <Contact>http://weblogs.asp.net/wkriebel/contact.aspx</Contact>
      <Url type="text/html"
    template="http://weblogs.asp.net/wkriebel/search.aspx?q={Search Terms}&o=Relevance"
    /> 
      <LongName>Search Westin's Public Technical Log</LongName>
      <SyndicationRight>open</SyndicationRight>
    </OpenSearchDescription>
  2. Publish the file somewhere, such as http://weblogs.asp.net/blogs/wkriebel/searchWestinTechnicalLog.xml
  3. Add a LINK tag to a web page where you want it to light up the Search Box Drop Down:
    <link title="Westins Technical Log" rel="search"
       type="application/opensearchdescription+xml"
       href="searchWestinTechnicallog.xml">
    </head>
  4. Optionally, add a link to the page that will add the provider:
    <A href="http://weblogs.asp.net/controlpanel/blogs/posteditor.aspx?SelectedNavItem=Posts┬žionid=524&postid=5709632#" onclick="window.external.AddSearchProvider(&quot;searchWestinTechnicallog.xml&quot;);">Click here to add a search provider for Westin's Technical Log to your toolbar search box</A>

There are a number of things for which this is handy:

  • SharePoint sites:
    Example: http://someSharePointServer/SomeSiteCollection/SomeSite/_layouts/OSSSearchResults.aspx?{Search Terms}
  • Visual Studio Team System Web Access:
    Example:  http://MyVSTSWebAccess/WorkItemTracking/WorkItem.aspx?artifactMoniker={Search Terms}
  • Community Server
    The example in this article

Also, you can select from existing search providers, or use a form to create your own or copy the XML to your page at: http://www.microsoft.com/windows/ie/searchguide/en-en/default.mspx 

Other articles on this topic:

No Comments