I was reading Redfin’s Developer Blog and the IE blog a few months ago and I got this desire to write my own OpenSearch provider. OpenSearch was originally created by A9.com (an Amazon.com company) and was primarily designed as a way for web developers to publish search results in a standard and accessible format. This turns out to be a good idea because different types of content require different types of search engines. The best search engine for a particular type of content is frequently the search engine written by the people that know the content the best. Google is great at searching unstructured content on the internet, but when it comes to structured search on a single web site there are much better options (Endeca, FAST, Autonomy, Solr, my favorite SQL database, etc). The other benefit of OpenSearch providers is that it shifts the balance of power away from Google and back toward web browser vendors & web site developers.
Both of the major web browsers support the OpenSearch Referrer extension. IE 7+, Firefox 2+ & Chrome allows you to add search engines to your browser without leaving the web page. The best place to get started is from the browsers vendors themselves. You can add search providers from Microsoft’s site or you can add search providers from Firefox’s add-ons site. In the interest of full disclosure, Opera allows you to add search engines manually, and Safari currently does not support this feature in any form (unless you count using vi to edit the Safari executable or changing your OS’s hosts file as support, which I do not recommend).
Anyway, our developer friends at Redfin wrote a blog post about their OpenSearch provider on their dev blog some time ago. Of course, they took the easy way out by not developing an OpenSearch Suggestions extension (slackers). I decided that a search provider without suggestion support is lame, so I took a stab at creating one. I think what inspired me to write an OpenSearch suggestions provider is that the IE 8 team blogged about their new Visual Search feature (which embraces & extends the OpenSearch suggestions work that Firefox pioneered) and I could leverage the work to improve the search experience for both IE 8 & Firefox 2+ users. (And the satisfaction of having a cool feature that Redfin & Estately haven’t implemented yet was probably another factor).
This functionality is typically exposed to users, via the search engine bar, next to the address bar in your web browser. So in your page markup, you’ll add something like this that tells the browser that your web site has a search service.
<link title="RPA Real Estate Search" type="application/opensearchdescription+xml" rel="search" href="http://www.seattlehouses.com/Feeds/OpenSearch.ashx"/>
The above element points to your site OpenSearch Description XML file which describes your search service in a way the browser can understand. When you visit RPA’s site, the browser will read RPA’s OpenSearch Description file located here and unobtrusively let you add the site’s search providers.
Assuming everything is working correctly, the user should be able to visit RPA’s web site, click on the browser’s search bar to add our search provider like so… (IE’s screen captures are on the left, Firefox’s are on the right).
I’ve also added a button in RPA’s search bar (see above right) in case site visitors don’t discover our search provider via the browser (I suspect most users would miss it otherwise).
After you’ve registered RPA’s search provider with your web browser, you can select it and just start typing. Since I’ve implemented a suggestions service, it will auto complete cities, school districts & neighborhoods as you type them (Didn’t I say this was cool?). I should note that although IE 7 & Chrome support OpenSearch, only IE 8 and Firefox currently support the suggestions providers. Anyway, if you wanted to look for listings in Bellevue, here’s what it currently looks like.
As you’ll notice, IE 8 & Firefox 3 displays suggestions differently on RPA’s site. This is intentional because IE 8 supports a newer version of the OpenSearch standards (Microsoft calls it Visual Search) and I designed RPA’s search provider to exploit this fact. In Firefox, the browser can only handle plain text suggestions, which can lead to ambiguous searches. For example, let’s say you search for Riverview. Riverview is both a neighborhood in Kent and a school district in Carnation / Duvall, so in Firefox there is no means for the user to tell the web site in which context they meant to search for when they typed in Riverview. I suppose one could create a “Did you mean” results page for cases like this, but I think that somewhat defeats the purpose of having suggestions support.
However, in IE 8, if a term has multiple contexts, the search provider can display them all and the user can select the one they meant. Also in IE 8, the search provider can display thumbnails next to the suggestions, which further helps the user quickly find what they are looking for. Although, I haven’t implemented that feature yet (mostly because I wasn’t sure what picture I should put up there for search terms that return multiple results), other web sites have. For example, if you wanted to buy a movie from Amazon or learn more about our 16th president from Wikipedia, the IE 8 search provider experience looks like this…
As the Redfin developers stated, implementing OpenSearch Referrer extensions are surprisingly easy (so I think users will soon request them from all web sites once the word gets out). The OpenSearch Suggestions extensions are more difficult to implement because every single keystroke is essentially a REST web service call. If you aren’t careful, you could bring your web server to its knees real quick. However, given all the AJAX map based tricks today’s real estate web sites perform, this isn’t anything that a professional software engineer can’t handle.
Call me crazy, but I think OpenSearch providers are going to become bigger than RSS feeds over the next year. If IE 8’s forth coming release doesn’t launch them into the mainstream, I think future releases of Firefox & Chrome will improve upon IE 8’s good ideas. Maybe you should think of it as browser favorites on steroids? If search is sticky, then OpenSearch is superglue and duct tape. If Firefox’s suggestions support were the tip of the iceberg, then IE 8’s implementation is cooler than Barrow, Alaska. The future of OpenSearch looks bright, even if it’s cold outside.