Hi,

My basic question is whether it is possible to continue to add documents to an index 
in one Thread while running a long running optimization of the index (approx 30 mins) 
in another thread.  I'm using Lucene version 1.4.2.  The concurrency matrix at 
http://www.jguru.com/faq/view.jsp?EID=913302 shows that if you use the same 
IndexWriter object you can do concurrent writes and optimization.  When I try it in my 
program the addDocuments wait until the optimization has finished, so in this respect 
it is Thread safe, but the operations cannot be performed at the same time.  Our 
problem is that the index needs to be continually kept up to date with new news 
articles, but also needs to be regularly optimized to keep it fast.  If I cannot 
update and optimize one index at the same time the best way I can see of doing this is 
maintaining multiple identical indexes and offlining, optimizing, letting them catch 
up-to-date and re-onlining them.  Does that sounds best to you?

Thanks a lot in advance


Steve

Reply via email to