lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: Searching while optimizing
Date Wed, 20 Aug 2003 19:25:41 GMT
That is an old FAQ item.  Lucene has been thread safe for a while now.

Doug

Steve Rajavuori wrote:
> This seems to contradict an item from the Lucene FAQ:
> 
> <<
> 41. Can I modify the index while performing ongoing searches ?
> Yes and no. At the time of writing this FAQ (June 2001), Lucene is not
> thread safe in this regard. Here is a quote from Doug Cutting, the creator
> of Lucene: 
> 
> 
> The problems are only when you add documents or optimize an index, and then
> search with an IndexReader that was constructed before those changes to the
> index were made. 
> A possible work around is to perform the index updates in a parable and
> separate index and switch to the new index when its updating is done. The
> switching may be done for example, using a variable that will points to the
> directory of the current active index. Since searches have a relatively
> short life time, you may discard (or resue the old index) short time after
> performing the switch (this grace period should be a little longer if you
> want to let all searches that involved paging through the hit list to be
> completed with consistent results). 
> 
> 
> Can you explain further?
> 
> -----Original Message-----
> From: Doug Cutting [mailto:cutting@lucene.com]
> Sent: Thursday, July 31, 2003 2:31 PM
> To: Lucene Users List
> Subject: Re: Searching while optimizing
> 
> 
> Aviran Mordo wrote:
> 
>>Is it possible and safe to search an index while another thread adds
>>documents or optimizes the same index?
> 
> 
> Yes.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


Mime
View raw message