You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Brandon Lee <bh...@bigredswitch.com> on 2004/03/16 18:47:13 UTC

FAQ 3.41 (modify index while searching)

Hi.  In the Lucene FAQ, 3.41; it's stated:
  http://lucene.sourceforge.net/cgi-bin/faq/faqmanager.cgi?file=chapter.search&toc=faq#q41

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

Is this still true?  Looking on the mailing list, it seems like people
are doing this w/ the caveat that any Readers created will not include
documents added by any subsequent Writers.

Also, this FAQ does not state the consequences of this - will Lucene
crash if using a Reader where a subsequent Writer adds documents?  How
about in the case of optimize?

Thanks for any help.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: FAQ 3.41 (modify index while searching)

Posted by Otis Gospodnetic <ot...@yahoo.com>.
>From the quick scan of the entry, I would say the entry is still true.
This is not an issue of being thread safe or not, really.

The jGuru Lucene FAQ is more up to date anyway, so I suggest you check
that one.

Otis

--- Brandon Lee <bh...@bigredswitch.com> wrote:
> Ooops, sorry, found this on the mailing list referring to 3.41:
> (maybe
> someone should update the FAQ item?)
> 
> 
>   From: Doug Cutting <cu...@lucene.com>
>   Subject: Re: Searching while optimizing
>   Date: Wed, 20 Aug 2003 12:25:41 -0700
> 
>   That is an old FAQ item.  Lucene has been thread safe for a while
> now.
> 
> 
> * Brandon Lee <bh...@bigredswitch.com> [2004-03-16 12:51]:
> | Hi.  In the Lucene FAQ, 3.41; it's stated:
> |  
>
http://lucene.sourceforge.net/cgi-bin/faq/faqmanager.cgi?file=chapter.search&toc=faq#q41
> | 
> |   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
> |   ...
> | 
> | Is this still true?  Looking on the mailing list, it seems like
> people
> | are doing this w/ the caveat that any Readers created will not
> include
> | documents added by any subsequent Writers.
> | 
> | Also, this FAQ does not state the consequences of this - will
> Lucene
> | crash if using a Reader where a subsequent Writer adds documents? 
> How
> | about in the case of optimize?
> | 
> | Thanks for any help.
> 
> ---------------------------------------------------------------------
> 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


Re: FAQ 3.41 (modify index while searching)

Posted by Brandon Lee <bh...@bigredswitch.com>.
Ooops, sorry, found this on the mailing list referring to 3.41: (maybe
someone should update the FAQ item?)


  From: Doug Cutting <cu...@lucene.com>
  Subject: Re: Searching while optimizing
  Date: Wed, 20 Aug 2003 12:25:41 -0700

  That is an old FAQ item.  Lucene has been thread safe for a while now.


* Brandon Lee <bh...@bigredswitch.com> [2004-03-16 12:51]:
| Hi.  In the Lucene FAQ, 3.41; it's stated:
|   http://lucene.sourceforge.net/cgi-bin/faq/faqmanager.cgi?file=chapter.search&toc=faq#q41
| 
|   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
|   ...
| 
| Is this still true?  Looking on the mailing list, it seems like people
| are doing this w/ the caveat that any Readers created will not include
| documents added by any subsequent Writers.
| 
| Also, this FAQ does not state the consequences of this - will Lucene
| crash if using a Reader where a subsequent Writer adds documents?  How
| about in the case of optimize?
| 
| Thanks for any help.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org