s.grinovero wrote:
sorry for the delay
I've noticed that Lucene 2.4 introduced some problems with IndexReader.reopen(), which is used by the ReaderProvider used by default in Hibernate Search since 3.1
The problems are supposed to be fixed in Lucene 2.4.1 (make sure you use that one), but NFS has always added some trouble.
If you're already using Lucene 2.4.1 or if switching to it doesn't help, try
Code:
hibernate.search.reader.strategy=not-shared
That's not the most efficient setting but it avoids the usage of IndexReader.reopen(), and then please get us back some feedback about this.
BTW, do you really require to use NFS? it's discouraged for Lucene indexes for many reasons: it might work but AFAIK nobody is caring to test that.
I have been able to get back to looking at this and we are using Lucene 2.4.1. I have tried applying the reader strategy configuration you mention here but I am still seeing the problem.
The setup I'm using consists of two slaves one master using the slave and master directory providers and configuration as promoted in the book.
The local location of the slaves and the master is local disk while the master will push index updates to a shared location which is NFS.
The main difference I guess is instead of using the JMS queue for handling incremental updates there is a periodic job that scans for changes and will use the manual indexing apis. This is done by the master process.
Since I'm using manual indexing in the master I have set the
Code:
<property name="hibernate.search.indexing_strategy" value="manual"/>
property since I'm not using JMS. This appears acceptable based on what I have read.
One more thing, if any updates are detected during the periodic db scan I will purge those specific entities before indexing them.
Since using the manual apis are safe I assume that is fine as well.