Saturday 10 November 2007

Compass or Hibernate Search

Compass and Hibernate Search are two frameworks to provide full text search engine to your apps.
Which one to choose? This is a large discussion between Emmanuel Bernard (Hibernate) and Shay Banon (Compass), my conclusion is that both are really good.
Yeah, both are really good but I have to choose one, and I choose Hibernate Search, here my reasons.
  • I use Hibernate API with JPA annotations and similar API seems more natural, to learn and understand.
  • Minimal configuration. I only have to put two properties in the config.
  • All of my searchable data are in database.
  • I think the Hibernate Search annotations fits better with JPA annotations.
  • And the last, Hibernate Search is in maven repository (Compass no).
If I used Ibatis or JDBC directly, I'd choose Compass.
Maybe, if I had many searchable data, that aren't in database I'd choose Compass too.

2 comments:

Anonymous said...

Note that the devil is usually in the details. Compass is a very mature project that support very advance mapping requirements, sub index hashing, automatic all property (highly optimized) and so much more (you won't believe how much). Compass is a result of 3 years (man, how time flies) of needing to support different, advance and sometime obscure :) search requirements. Hibernate search is starting to get some of the features that Compass has, but it has a long way to go. Theses are things that you might miss while doing a 1 day comparison.

Cheers,
Shay Banon

dahernan said...

Thanks for the comment Shay.

Few months ago I saw your talk in parleys site and Compass is in my todo list long time ago.

Like you said Compass is powerful and mature but in this case I've bet for the simplicity and use Hibernate Search like a extension.
I do the searches in a normal HibernateDAO, and most important generic searches in a GenericHibernateDAO.

Maybe if search requirements gets complicated I have to run away :)