Search/Rich Results
Summary
Here's a proposal for implementing functionality into Firefox which gives users a quicker path to specific information they are looking for (called "rich results") when they type something into the search box.
Examples
When a user searches for "YHOO", which is a stock symbol for Yahoo Inc., they probably want a stock report for that company.
When a user searches for "Casino Royale", which is the title of a film currently playing in the theaters, they probably want show times at nearby theaters, a synopsis, reviews, and/or to purchase tickets online.
When a user searches for the word "weather" and a zip code or city, they probably want a weather report for that locality.
And when a user searches for an address, they probably want a map of it.
Implementation
To give users the information they are likely to be looking for, I propose that we build an API for a piece of code to register itself as a rich result provider. When a user types terms into the search box, we query registered providers to see which has a rich result for the terms, then we provide an item in the Search History/Suggestions menu for each available result.
If the user selects a rich result from the menu, we display the result in some appropriate part of the interface. In the current proposal for improvements to search, this is a popup submenu, but we could put it elsewhere (f.e. in the content pane) if another location turned out to make the most sense.
Providers might use a variety of mechanisms to determine whether they can provide a result, including evaluating a regular expression against the search terms, looking up the terms in a hash table, or querying a server. And they might provide the result itself in a number of ways, generating it themselves (perhaps using data downloaded from a web site) or just constructing a URL at which the result can be found.
We should ship with a set of high-quality providers but also provide a mechanism for web sites to publish add-ons which users can install to extend the set of available results. This mechanism could simply be regular extensions which register themselves as rich result providers, or we could create a new kind of add-on specifically for this purpose.
Related Features
Search Suggestions
Firefox's Search Suggestions feature implements something like this for mathematical calculations and unit conversions. If you type "1+1" into the search box, the first suggestion will be "= 2", and if you type "1 inch to centimeters" into the box, the first suggestion will be "= 2.54 centimeters".
The primary limitation of this functionality as compared to rich results is that a single menu item provides very limited real estate for displaying results. A secondary limitation is that it only consults the default search provider.
Keyword Bookmarks
Firefox's Bookmarks feature also allows you to set up a "keyword" bookmark which you can trigger by entering the keyword into the location bar. If the bookmark URL contains "%s", and you type terms after the keyword when invoking the bookmark, "%s" will be replaced by the terms.
So you can invoke requests for specific information with the appropriate keyword. For example, if you have a "weather" keyword bookmark to a weather.com page showing the weather for a specific zip code, and the URL contains "%s" in place of the zip code, then entering "weather 94043" into the location bar will load the weather.com page showing the weather for Mountain View.
The primary limitation of this functionality as compared to rich results is that users have to manually construct keyword bookmarks, including editing complicated URLs and understanding how templates work.
A secondary limitation is that such bookmarks can only be invoked via a single keyword that precedes the search terms, so "94043 weather" wouldn't trigger the example in the previous paragraph (because the keyword succeeds the term), and "forecast 94043" also wouldn't work because the bookmark doesn't recognize "forecast" as a synonym for "weather".
A tertiary limitation is that such bookmarks can only be invoked in the location bar, although users mostly search using the search bar.
Search Engine Results
Google and Yahoo! both provide rich result-like information at the top of their search results pages for certain search terms. Yahoo! calls the functionality Yahoo! shortcuts, while Google calls it Google Web Search Features.
The primary limitation of these server-side implementations as compared to rich results is that users have to load an entire search results page to see the information. A secondary limitation is that there is no mechanism for web sites to extend the set of available results and for users to take advantage of those extensions.