Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate search vs lucene

 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello author,

Can you please the two and let us know the advantages and disadvantages.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vs Lucene? Hibernate search uses Lucene, they are not competitors.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul. Can HS integrate with other frameworks similar to lucene ?
 
Emmanuel Bernard
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate Search uses Lucene and adds some sugar on it.

Some advantages of Hibernate Search over raw Lucene:
- changes in your database (made by Hibernate Core) are propagated transparently for you to the Lucene index
- indexing is optimized for you. HSearch does for Lucene that Hibernate Core does for JDBC
- queries return managed objects instead of the Lucene Document (which is basically a hashMap of Strings
- clustering out of the box
 
Emmanuel Bernard
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate Search uses Lucene. The reason of our choice is mainly:
- OSS
- the best and most popular full-text search library out there

While we could theorically use a different search engine, it is not possible today. Unfortunately the Full-text world does not offer a standard (there is no JPA spec for full-text search) and differences between libraries are quite big.

That being said, integrating with Solr (a product build on top of Lucene too) is probably possible with some work (not trivial but possible I think).
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your replies.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are are comparable frameworks like HS around ?
 
Emmanuel Bernard
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The closest framework is probably Compass but the emphasis is different (check one of the post from yesterday, we discussed that).
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I will search for the thread you are talking about.Can you tell me whether HS supports pagination?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it does. See this useful link.
 
Emmanuel Bernard
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes paginations are supported and with your favorite (Hibernate Core) APIs

Query query = //create my fullTextQuery
query.setFirstResult(100).setMaxResults(50);
List results = query.list();


Paul's link has more infos.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic