Hi, You should probably just look at the index version number to figure out if the name changed. If you are looking at segments.gen, you are looking at a file that may not exist in Lucene in the future. Use IndexReader API instead.
By "refreshes" do you mean "reopened a new Searcher"? Does commit + post commit event not work for you? By "kicks Solr" I hope you don't mean a Solr/container restart! :) Otis-- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch ----- Original Message ---- > From: Andrey Klochkov <akloch...@griddynamics.com> > To: solr-user@lucene.apache.org > Sent: Tuesday, April 28, 2009 4:57:54 AM > Subject: Re: Solr Performance bottleneck > > On Mon, Apr 27, 2009 at 10:27 PM, Jon Bodner wrote: > > > > > Trying to point multiple Solrs on multiple boxes at a single shared > > directory is almost certainly doomed to failure; the read-only Solrs won't > > know when the read/write Solr instance has updated the index. > > > > I'm solving the same problem while working with index stored in data-grid > and I've just created a data-grid listener which looks for "segments.gen" > file changes and forces Solr to refresh its structures after receiving this > event. You can do the same job with file system index - write some code > which looks at segments.gen file changes and kicks solr when a change is > detected. > > It would be great to add such a mechanism to Solr, I mean some abstracted > (via an interface) way to implement index refresh events sources. > > Also there's code in SolrCore which checks index existence by looking into > file system and it would be better to abstract that code too. WDYT? I can > provide patches. > > -- > Andrew Klochkov