Xan has a great post on how to build your own search engine. It's not nearly as difficult as it sounds and she notes (as Matt Cutts did in his interview by Aaron) that it will quickly make you an on-page optimization guru. If you've got a few free hours at home and some experience with Perl, give it a shot and please report back with anything you learn.