lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Halsey" <>
Subject using optimize and addDocument concurrently.
Date Tue, 19 Oct 2004 15:01:38 GMT

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
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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message