-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Sharing lucene indexes between multiple server instances
PostPosted: Tue May 21, 2013 7:55 am 
Newbie

Joined: Tue Mar 06, 2012 9:13 am
Posts: 4
We have an application where we are using Hibernate Search 4.1 for implementing lucene based search. We are using both incremental indexing and manual indexing(scheduled) and both are using the same lucene directory.

This design has a flaw when both indexing works parallel, some of the indexes get lost if there is write lock on any of the indexes.
Also the same problem will arise in clustered environment as lucene doesn't allow multiple writers on same lucene index.

There is standard solution(Master-slave setup) documented in the Hibernate search document. I am just evaluating the other solutions also. For example, Can i also use the customized backend to redirect all the lucene updates to QueueManager and then allowing one of the server to consume the lucene updates and write to the lucene indexes. In this case, Only one of the instances will have write access to indexes and other instances will only be reading indexes.


Top
 Profile  
 
 Post subject: Re: Sharing lucene indexes between multiple server instances
PostPosted: Thu May 30, 2013 4:51 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi that's correct, you should never allow two different instances to write on the same index because of the locking requirements.

Configuring one of your servers as master is the appropriate solution.

You mentioned "multiple server instances"; do you mean on physically separate servers? Keep in mind there are problems with sharing a read/write index over network shares: that's another good reason to use the master/slave architecture as explained in the reference documentation.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.