Light Up IE with Open Search
In my Search presentation at SPC I demonstrated how to tap into Internet Explorer and Firefox’s search capability to detect open search definition files on the server. The technique is quite simple and the resulting effect very powerful. Open search defines where the browser can send a search query to the current site. It also enables visitors to save the settings of the current site as a search provider in order to send a query from any browser session.
The file format looks like the following, fix up the URL to point to your search center.
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Company Intranet</ShortName>
<Description> Company Intranet Search</Description>
<Url type="text/html" template="http://intranet.company.com/searchcenter/pages/results.aspx?k={searchTerms}"/>
<SyndicationRight>open</SyndicationRight>
</OpenSearchDescription>
<link title="Title" type="application/opensearchdescription+xml" rel="search" href="/Style Library/XSL Style Sheets/opensearch.xml" />
Check-in and publish the master page.
Open your home page in a browser and you should see the internet Explorer 7 search button turn orange.
Select the drop down button and you should see your title as one of the search providers.
Choose the Add Search Providers menu option and you should see your search provider listed.
Selecting your search provider should display the following dialog.
Choose Add Provider and your web site will be listed as an option for searching in Internet Explorer.
Test the settings by entering a search term and submitting it to your search center, the results page should render displaying the results of your query.
For SharePoint sites you can add any number of search providers. The following example works for the out of the box People Search page.
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>People Search</ShortName>
<Description>People Search</Description>
<Url type="text/html" template="http://intranet/searchcenter/pages/peopleresults.aspx?k={searchTerms}"/>
<SyndicationRight>open</SyndicationRight>
</OpenSearchDescription>
I find this functionality very popular for Intranets. Of course you could add this functionality to your Internet site as well, but that would really depend on what you are offering the public in the way of search and weather the public is interested in permanently linking to you site for search.
Ready to start your next project with us? That’s great! Give us a call or send us an email and we will get back to you as soon as possible!
+1.512.539.0322