2

I am new to hibernate search and i am using hibernate search 5.3 for my application. I have a cluster of servers which should maintain a lucene index and if there's a change in entitty, I am trying to put it in a jms queue and let all the other servers to extract the updates from here and reindex their lucene indexes .

I have written a searchInterceptor which would pick up the entities after every transaction and send them to a topic. I had extended FullTextIndexEventListener and implemented the processWork() to add messages in the queue, i am stuck now because this is made final now. Can any one tell me how to proceed from here?

1 Answers1

0

Any reason why you are not opting for a master/slave setup as provided by Search, for example the JMS master/slave setup where indexing is done by a single master and the index then shared to the slaves?

But if you want to continue w/ your approach I would think the right extensions point is a BackendQueueProcessor. You either need a mix of LuceneBackendQueueProcessor and JmsBackendQueueProcessor where incoming changes are indexed locally and put onto a JMS topic for all other nodes. Or to keep the architecture symmetric you could generally all updates onto the topic and all nodes only apply from this topic. Either way, the current JMS backend code should be able to guide you into the right direction.

Hardy
  • 18,659
  • 3
  • 49
  • 65
  • Thanks. Not using the master/slave setup because, we do not want to configure a new master incase it goes down. – aakhila shaheen Nov 09 '15 at 14:03
  • Hi, just a question: if using JMS topic to let the other nodes know about the insertion / ... is it possible that a write lock issue occurs (reading the JMS message and tries to update the index but at the same time an entity is created / updated so the index is refreshed by Hibernate Search => 2 processes try to lock the same index) ? Thanks, V. – Viktor Oct 13 '17 at 14:24
  • Hi Victor, The index is maintained individually in each of the servers, hence no lock issues :) – aakhila shaheen Dec 10 '17 at 08:58