Lucene for BBWeblog2

I spent an hour last night investigating the use of Lucene as a possible search engine for my BBWeblog v2 project, and was surprised how easy it was to knock something together pretty quick.

In less than an hour I had a standalone simple app that iterated through rows in one of my database tables and built the Lucene index, and then modified the sample search demo app to search against my index. I’m impressed. I was wondering how to make the jump from the file based examples in the documentation to searching a database, and it was as simple as building the Documents to populate from the index from data I had retreived from my table.

I’m going to be integrating a Lucene based search into v2 of BBWeblog (the app that runs this blog) – the currect source is in CVS on SourceForge. There’s some major changes coming up, including reworking the DAO to use Hibernate instead of JDBC (which reduced the amount of code by about 70% (!). Eventually when it’s ready, hopefully in the next month or so I’ll replace the v1 app currently running on this server with the v2 version. The v1 app has been running successfully on this server on JBoss 3.x for about 3 years now, with no problems whatsoever. I think I should have somenice usabilitiy enhancements coming for V2.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.