{ by david linsin }

November 07, 2006

Hibernate Lucene Integration


I checked out Hibernate's Lucene integration and I must say it looks quite interesting. The concept it pretty straightforward: An entity is mapped to a Lucene Index, it's properties can be indexed using annotations. Hibernate is taking care of the mapping it self, all you need to do is register an EventListener which is called after a Hibernate event (e.g. an update) occurred.

So far the document only covers creating/updating Lucene indexes. I found an interesting posting on the Hibernate developer mailing list, which points out that there is more to come with Hibernate 3.3. It seems like there will be some kind of LuceneSession object that can be used, among other things, to query a Lucene index. The cool thing is that you can use the native Lucene Query Language and get a Hibernate Query object in return.

This sounds really cool, the only concerns I have are about performance. What if you have a huge index, in terms of a lot of Lucene Documents, how big is the performance impact when storing/updating/querying the index? Let's say you are performing a search with a big result set, how is Hibernate gonna handle that (caching or proxies)? Another issue, when storing/updating a Lucene Index, is how and when is the optimize() method called?

Updates will follow...

0 comments:


com_channels

  • mail(dlinsin@gmail.com)
  • jabber(dlinsin@gmail.com)
  • skype(dlinsin)

recent_postings

loading...