Wednesday, 25 March 2009

OpenSearch 'Visual Search'aroo (for IE8)

About 6 months ago I added OpenSearch.xml to searcharoo.net.

Now that IE8 has been released there is a new "Visual Search" feature that can be enabled via opensearch.xml.

When you visit searcharoo.net, OpenSearch-supporting browsers will provide a visual indicator (eg. this colored arrow) that you can add that site as a Search Provider.


Choose to add Searcharoo.net...


...and tick the box that you want to use search suggestions


Once it is set-up, you will receive real-time feedback/results as you type your search!



I did have some problems implementing it, however. The original post I saw was using a beta, and the latest documentation Search Provider Extensibility in Internet Explorer and XML Search Suggestions Format Specification shows the XML required is slightly different.

This was the opensearch.xml file that actually worked for me:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:ie="http://schemas.microsoft.com/Search/2008/">
<ShortName>Searcharoo.net</ShortName>
<Image height="16" width="16" type="image/icon">http://www.searcharoo.net/favicon.ico</Image>
<Url type="text/html" template="http://www.searcharoo.net/Search.aspx?searchfor={searchTerms}"/>
<Url type="application/x-suggestions+xml" template="http://www.searcharoo.net/SearchSuggest.aspx?searchfor={searchTerms}"/>
<ie:PreviewUrl type="text/html" template="http://www.searcharoo.net/SearchSuggest.aspx?searchfor={searchTerms}"/>
</OpenSearchDescription>


with the following added to the .master page

<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Searcharoo.net">

I'm still working on improving the output of the search, but you can view it's response to the browser using this URL - http://www.searcharoo.net/SearchSuggest.aspx?searchfor=manhattan (note the addition of xmlns). The XML also supports image/previews, so Searcharoo will need another upgrade to support that too..

2 comments:

  1. Hello Craig. Congrats on searcharoo and your other work. Sorry to post this request to your blog but could not find any other method to reach out. We are looking for paid support to searcharoo. Any advice, leads you can provide is greatly appreciated. Cheers. PeterSpev at gmail

    ReplyDelete
  2. Hey Peter, thanks for the kind words. I've emailed you direct re: your query. Unfortunately this update in March was the last time I had a chance to work on Searcharoo - so it is a lagging a bit behind in new features.

    ReplyDelete

Note: only a member of this blog may post a comment.