Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 81322 invoked from network); 1 Jul 2009 10:47:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Jul 2009 10:47:49 -0000 Received: (qmail 2124 invoked by uid 500); 1 Jul 2009 10:47:58 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 2063 invoked by uid 500); 1 Jul 2009 10:47:58 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 2053 invoked by uid 99); 1 Jul 2009 10:47:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jul 2009 10:47:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of simon.willnauer@googlemail.com designates 209.85.217.215 as permitted sender) Received: from [209.85.217.215] (HELO mail-gx0-f215.google.com) (209.85.217.215) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jul 2009 10:47:47 +0000 Received: by gxk11 with SMTP id 11so1085762gxk.5 for ; Wed, 01 Jul 2009 03:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Fx8us3jXxI3PjY6yKq47A8Hpje0mdCuEGu4tQf+bKo8=; b=qaMsY10HTYpe0vBwsCVuKv93Z3HGL4za5ulLtyjKMT8P7ZESGukPa1Xm7i29qQqnJT WssFhlYvLCyPr1IuL9mxudDpR00g80juq06HgdYXsEIjFMZF1uYmb4+5dkp9q8Ru9i15 A2Ou2cGGkZXAVVKjJM/ioEVhkbjltJILEgDL0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; b=cPiVv9xjLHwTJY5s9ZqCTi4rDll+BDKcrbzdGGEvVg+vstC6gZrRWp2KaM9kW4YoKq w4YAt/eo1i24hwMQE0DPCFDSRzwNTaaIohU9h3D4MMwuOAtAFnxP+s1g8H23UdwrU1s2 NRBmBxiytqHBcvEMqoO9VODftRrs+gZMrnhHo= MIME-Version: 1.0 Received: by 10.100.208.9 with SMTP id f9mr13337658ang.55.1246445247004; Wed, 01 Jul 2009 03:47:27 -0700 (PDT) Reply-To: simon.willnauer@gmail.com In-Reply-To: <22e801c9fa38$33508f80$710bc30a@sv.us.sonicwall.com> References: <6f4104d80907010057x138028au6dc9e847723d21b6@mail.gmail.com> <22e801c9fa38$33508f80$710bc30a@sv.us.sonicwall.com> Date: Wed, 1 Jul 2009 12:47:26 +0200 Message-ID: Subject: Re: IndexWriter From: Simon Willnauer To: java-user@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org You might want to take care of the write.lock file in the index directory if your application breaks down. If you do not close the writer and restart you app you might get an LockObtainFailedException. simon On Wed, Jul 1, 2009 at 12:39 PM, Ganesh wrote: > Yes. Single IndexWriter could be maintained in a App and it could be clos= ed when the App is shutdown. > > Regards > Ganesh > > ----- Original Message ----- > From: "Amin Mohammed-Coleman" > To: > Sent: Wednesday, July 01, 2009 1:27 PM > Subject: IndexWriter > > >> Hi >> >> This question has probably been asked before so apologies for asking it >> again. =C2=A0Just to confirm that it is ok to use a single index writer = in a web >> application and only close that single instance on application shutdown?= =C2=A0As >> the indexwriter is thread safe there is no need for any external >> synchronisation. =C2=A0Am I correct in thinking this? >> >> I have configured via spring a single index writer which is used in the >> application and I use the same one for adding and updating documents. = =C2=A0This >> index writer is closed when the spring application context shutsdown. >> >> >> Cheers >> Amin >> > Send instant messages to your online friends http://in.messenger.yahoo.co= m > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org