I have used Hibernate in the past and I share many people's frustration with using an ORM. Since traditional databases are relational, any ORM has a leaky abstraction. Much of my time ends up being used to understand the details of the abstraction so I can achieve good performance.
Hibernate Search however works on top of Lucene. Since Lucene contains a collection of documents of the same types, it might not have the same problems as Hibernate with a relational database. Does Hibernate Search provide a clean abstraction, or is Hibernate Search fraught with the same problems as Hibernate+MySQL?
I'm considering moving from an existing implementation in raw Lucene to Hibernate Search.
insert
s add the children with a null
reference to the parent, but if the many-to-one side owns the relationship, then the children are insert
ed with the reference to the parent (which is much faster) - schmmd 2012-04-05 16:18
A good abstraction is an abstraction which solves a problem which is not addressed by the underlying library with no or little compromise on the feature set. In case of Lucene, these problems could be:
Then, the best abstraction depends on this problem you need to solve:
If you just want to be able to build a reverse index on a single server and query it, then stick to plain Lucene. Lucene is already the best abstraction available. Any other abstraction would add overhead while probably preventing you from using some features and not making things much easier.
If you want to go distributed, then Solr or Elastic Search would help you a lot.
If you want to integrate full-text functionality with another persisted data set, then Hibernate Search or Compass could be interesting candidates.