Hi Patrick, thanks for writing back but my question is:- do we really need to write something new to achieve what I want to achieve. By going thru Lucene Tutorials, i dont think there is a need to do such a thing:-
http://blog.danbartels.com/archive/2004/09/09/186.aspx Indexing and searching are not only thread safe, but process safe. (Multiple processes can work with the Lucene index files at the same time). Generally the index searcher is thread safe and the index writer is thread safe. The query parser is *not* thread safe (so each thread using the index should have its own query parser). The index writer is thread safe, so you can update the index while people are searching it. However, you then have to make sure that the threads with open index searchers close them and open new ones, to get the newly updated data. Thanks -Nikhil On 3/13/06, Patrick Kimber <[EMAIL PROTECTED]> wrote: > > Hi Nikhil > We are using the index accessor contribution. For more information see: > > http://www.nabble.com/Fwd%3A-Contribution%3A-LuceneIndexAccessor-t17416.html#a47049 > This should help you to co-ordinate the IndexSearcher and IndexWriter. > Patrick > > On 13/03/06, Nikhil Goel <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Can someone please explain how does IndexSearcher and IndexWriter works > in > > conjuction. As far as i know after reading all the posts in newgroup, it > > seems everything works fine if we have one IndexWriter thread and > multiple > > IndexSearcher thread. But my doubt here is, looking at IndexSearcher > class, > > it seems it first reads the segments file and then one by one go to the > > respective .fnm files in the index...hence can occur a case, where it > has > > read segments file but in the meantime IndexWriter thread has updated > the > > index and the corresponding .fnm file doesnt exist in the index and this > > will give us the error .fnm doesn't exist and we will get an > IOException. > > > > Am I missing something in making sure that there can be multiple > > IndexSearcher thread and one IndexWriter Thread and still everything > works > > fine. > > > > thanks > > -Nikhil > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >