Home

Search

Drupal OpenSearch module released

Jul 17, 2006

Today I wrote a quick, basic OpenSearch module for Drupal. It implements the Amazon-originating spec for syndication and aggregation of search results.

The interesting part is that OpenSearch builds upon RSS and Atom, which means that the resulting feeds can be used in any news reader. Of course, an OpenSearch-aware reader can interpret the extra information that is present (total number of results, other search pages, search URL syntax, ...).

I've installed the module on Acko.net, so you can give it a try here:
OpenSearch description file (XML)
Search results for the query "Drupal" (RSS)

The module will be available on drupal.org as soon as CVS Contrib is repackaged in a couple of hours, though it will require Drupal CVS HEAD or 4.7-HEAD to work.

Spotlightish search result grouping

Jun 28, 2006

Here's a fun, albeit hackish search theme snippet for Drupal.

It takes advantage of the fact that the temporary tables for search stay around, to present results grouped by node type à la Apple Spotlight. Note that it does not simply reformat a single search result page, but regroups results across all pages.

In fact, it's really just a hackish way of doing N separate queries that contain a type:something restriction, one for each node type. To see more results, it presents you with a link to a normal type:something query.

It's a bit inefficient in that the presentational work for the normal results is thrown away (loading nodes, filtering content, extracting a summary). But it's a start ;).

Images