Andrey Klochkov wrote:
Even if you point multiple embedded solr servers to the same index, you
should write with only one. Once you do a commit on the writer, you'd need


But it's what lucene index locking is for, isn't it? Locking should handle
that issue. Solr doesn't use index locking in a proper way?

Lucene's lock file is used more as a fail safe to keep you from shooting yourself in the foot than a feature. Best practice is to use one IndexWriter on an index at a time. That said, not much stopping you from using it as a feature ;) So I am not sure why you ran into that exception - what type of drive is z? If its NFS, I think you want to try the native lock factory (if I remember right - NFS needs the right lock impl, and even then its not recommended).

What Shalin said doesn't imply Solr is not using locks right - he was just pointing out that if you add documents to one embedded Solr server, it will reopen readers and see the changes - the other embedded Solr server(s) will not get the message to reload. You would have to call commit on all of them to get each to reopen a searcher.

--
- Mark

http://www.lucidimagination.com



Reply via email to