Abhishek Ranjan
Abhishek Ranjan

Reputation: 931

Same Hibernate Search Lucene index for multiple applications

I have a database which is being used by two applications Appl 1 and Appl 2 .Both the applications perform Read/Write/Update on the DB.

I am using hibernate search for Indexing my search.

My problem is as follows :

  1. Both Appl1 and Appl2 reside on different servers and hence maintain there own copy of the index,on their local file system.
  2. Now because of this if Appl1 does any update/delete operation Appl2 does not reflect the changes and vice-versa.

Is there any way that both application indexes get updated,when either one of them performs any operation,or i can create a common index directory that is used by both the applications.

Upvotes: 0

Views: 745

Answers (1)

Hardy
Hardy

Reputation: 19119

Have a look at master/slave setup in the Hibernate Search documentation. The idea is that all updates are sent to a master index which applies them, while the slaves just handle search request using a local index which gets regularly synced with the master index.

Alternatively, you could look at the Infinispan based directory provider. Again look at the online docs.

Upvotes: 3

Related Questions