At the behest of Simon Willison, and with the help of Brad Choate (who apparently can debug Perl code in his head), I am now using a customized version of MT-Search 1.31b to power my very own site search. I had previously complained that MT-Search was too slow searching my 900+ entries, but all performance problems have been magically resolved after upgrading to Movable Type 2.2 and MySQL. This also solves the problem of the Google gap
(which Simon rightly complained about), whereby content would fall off the home page and disappear into the ether for three weeks until Google got around to reindexing it.
Update: search results are now available as RSS by adding Template=rss to the URL. (Inspired by Rael Dornfest.) This means that, if you’re interested in a topic for which I don’t have a category-specific feed, you can go create your own custom RSS feed based on search terms. If you only wanted to read my posts about Movable Type, you could create a custom Movable Type
feed. Or you could exclude posts, by using the keyword NOT in your search. (More examples of search syntax.)
Of course, this also opens the door for an entirely new type of online vanity: custom RSS feeds that mention you by name. Example: a custom Dean Allen
feed. Not that Dean Allen is vain. We love Dean. And his dog, Oliver. As you can tell from the Oliver
feed.
So how do you do it?
First, install MT-search.
Save the rss.tmpl template in your
mt/search_templates/directory.In your mt-search.cfg, add this line:
AltTemplate1 rss rss.tmplAlso if you’re using MT-Search 1.31b (the latest version at the moment), you’ll also need to patch the source code to fix some bugs. Around line 37 of SearchTemplate.pm, at the top of the
_hdlr_resultsfunction, add this line:my $output = '';This fixes a bug that would otherwise prevent using multiple
<MTSearchResults>tags per template. As always, thanks to Brad Choate for his help in tracking this down and fixing it.

