• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Search In Action- JMS as index maintainer?

 
Dinesh Sundrani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I have a MOM based architecture, by using JMS to configure Queues to accept index-updation commands, store them in order or receival and process them to update the Index data Structure?

Is there a chance of the index getting corrupted due to multiple writes and how to aviod and maintain the coherency?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Can I have a MOM based architecture, by using JMS to configure Queues to accept index-updation commands, store them in order or receival and process them to update the Index data Structure?

Yes. See this.
 
Emmanuel Bernard
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using a MOM though JMS to do what I call asynchonous indexing is actually our recommended approach to cluster full-text searches with Hibernate Search
Chapter 10 covers this topic and demonstrates how to set that up in Java EE (JBoss AS 5 is used as an example).

Here is how it works, there are slave nodes and one master node.
All slaves contain your application and can execute full text queries based on a loca version of the Lucene index (hence fast).
When objects are changed, the changes are sent to the JMS queue instead of being applied to the Lcueen index.
The master node does listen to the JMS queue (it's an MDB usually) and apply the changes to the master index.
On a regular basis (configurable), slaves copy the new master index to get the updated version of the index. The copy is incremental so after the first time, the copy is quite minimal.
 
Dinesh Sundrani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Awesomeee! Thanks Paul and Emmanuel!

That's exactly what I wanted to know a way to avoid burdening the master index copy each and every time the updation is made, Rather work on the local copies, if any upadtes - send them to the MasterAwaited Queue and let the master do the work of sync when it has time to do so.

This very much addresses my concern (posted int he other thread) about having a ultra fast search engine rather than a very precisive one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic