O’Reilly Labs (the white lab-coated arm of O’Reilly Media) has incubated a nifty little search tool, called Code Search, which allows you to drill through the more than 2.6 million lines of code from some 700 O’Reilly titles. You can search on a particular book title, a category of code (e.g. Perl, Java), a code phrase, a particular author, a date of publication range, and more. The database was built using the Mark Logic XQuery server.
I don’t know how this slipped under our radar before. Here’s Tim O’Reilly first announcing it back in late August, on HIS Radar. And here’s a link to the brief Code Search Page on the O’Reilly Labs wiki.