Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 54688 invoked from network); 3 Dec 2004 07:59:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Dec 2004 07:59:03 -0000 Received: (qmail 29612 invoked by uid 500); 3 Dec 2004 07:58:52 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 29584 invoked by uid 500); 3 Dec 2004 07:58:52 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 29562 invoked by uid 99); 3 Dec 2004 07:58:52 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from proserver2.ifit.uni-klu.ac.at (HELO proserver2.ifit.uni-klu.ac.at) (143.205.118.212) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Dec 2004 23:58:49 -0800 Received: from [10.1.100.30] ([193.206.186.101]) by proserver2.ifit.uni-klu.ac.at over TLS secured channel with Microsoft SMTPSVC(5.0.2195.6713); Fri, 3 Dec 2004 08:58:46 +0100 Message-ID: <41B01CB1.4020105@ifit.uni-klu.ac.at> Date: Fri, 03 Dec 2004 08:58:41 +0100 From: sergiu gordea User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lucene Users List Subject: Re: Thread safety References: <20041203001326.7394.qmail@web12708.mail.yahoo.com> In-Reply-To: <20041203001326.7394.qmail@web12708.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Dec 2004 07:58:46.0532 (UTC) FILETIME=[EA80AC40:01C4D90D] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Otis Gospodnetic wrote: >1. yes >2. yes error, meaningful, it depends what you find meaningful :) >3. searcher will still find the document, unless you close it and >reopen it (searcher) > > ... What about LockException? I tried to index objects in a thread and to use a IndexSearcher to search objects, but I have had problems with this. I tried to create a new IndexSearcher object if the index version was changed, but unfortunately I got some Lock Exceptions and FileNotFound Exceptions. If the answer number 3. is correct, then why did I get these exceptions. Sergiu >Otis > >--- "Zhang, Lisheng" wrote: > > > >>Hi, >> >>I have an urgent question about thread safety in lucene, >>from lucene doc and code I could not get a clear answer. >> >>1. is Searcher (IndexSearcher, MultiSearcher ..) thread >> safe, can multi-users call search(..) method on the >> same object at the same time? >> >>2. if on the same object, one user calls close( ) and >> another calls search(..), I assume we should have a >> meaningful error message? >> >>3. what would happen if one user calls Searcher.search(..), >> but at the same time another user tries to delete that >> document from index files by calling IndexReader.delete(..) >> (either through two threads or two separate processes)? >> >>A brief answer would be good enough for me now, thanks >>very much in advance! >> >>Lisheng >> >>--------------------------------------------------------------------- >>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 > > > --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org