Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 19392 invoked from network); 10 Mar 2011 10:55:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Mar 2011 10:55:12 -0000 Received: (qmail 4208 invoked by uid 500); 10 Mar 2011 10:55:10 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 4171 invoked by uid 500); 10 Mar 2011 10:55:10 -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 4159 invoked by uid 99); 10 Mar 2011 10:55:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Mar 2011 10:55:10 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ian.lea@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Mar 2011 10:55:03 +0000 Received: by iyj12 with SMTP id 12so2208018iyj.35 for ; Thu, 10 Mar 2011 02:54:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=2sbeXH5D07Sa/vSpYNLHdavHSqScG/bq2Rr8YBxVQIk=; b=B8Ab27KyzpGNeeel7tYXzgOvDB2HAXmYQLYJbtzE7vKtb+qPvuBBCytxxoP8Nrbn+g Hpavuffdc0bd1PFsPiL2ERCdfXeevkb2uIIdgsJquKVVTVFFJIKBSwf66AUMxLpsl4bg rkDGPbwn0SisHsyMPsFSZSZv0RwkJwz7bv+mU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=k7zaLtaJOOAy0CnfaHm5xBroHx5yzcruVzCMJvzDhZHMgLWOMl6VpIfaIzhe3Glcy+ sX2AFjDKcEyyyegi/zdZg/QB7+/nJ03KQqsP4F2PinNnuwdoq/m6SjQf3jnnmIgzFHk4 gwbTrooU92pFRLpZyT493zyQQP/0JO3FhnAPU= Received: by 10.231.5.136 with SMTP id 8mr4521321ibv.115.1299754482122; Thu, 10 Mar 2011 02:54:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.36.198 with HTTP; Thu, 10 Mar 2011 02:54:22 -0800 (PST) In-Reply-To: <1299699872430-2656875.post@n3.nabble.com> References: <1299699872430-2656875.post@n3.nabble.com> From: Ian Lea Date: Thu, 10 Mar 2011 10:54:22 +0000 Message-ID: Subject: Re: reopen with optimize and FileNotFoundException To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Usage sounds OK, but missing files on IndexReader.reopen definitely doesn't sound OK. 2.3.2 is ancient and there have been many improvements since then. I'd upgrade if possible. You could also try losing the optimizes. On recent releases you don't really need to use it. Not sure about 2.3.2 though. -- Ian. On Wed, Mar 9, 2011 at 7:44 PM, bart_212 wrote: > Hi, > I have two web applications that uses lucene 2.3.2. Both share the same > index and can write or read. Writing is synchronized based on file system= to > allow only one IndexWriter to work at the moment. There can be multiple > IndexReader. IndexReader is stored and before searching, there is done > #reopen on it. IndexWriter can add/delete group of documents and can > optimize the index while searching is performed (multiple threads can > search). > I'm wondering if these operations are thread safe and don't corrupt the > index? I have observed the following exception when one IndexWriter was > adding =A0and one IndexReader was reopened to search: > > java.io.FileNotFoundException: /tmp/test/index/_7y.tis > RandomAccessFile.open(String, int) line: not available [native method] > FSDirectory$FSIndexInput$Descriptor(RandomAccessFile).(File, String) line= : > 212 > FSDirectory$FSIndexInput$Descriptor.(File, String) line: 506 > FSDirectory$FSIndexInput.(File, int) line: 536 > FSDirectory.openInput(String, int) line: 445 > TermInfosReader.(Directory, String, FieldInfos, int) line: 61 > SegmentReader.initialize(SegmentInfo, int, boolean) line: 317 > SegmentReader.get(Directory, SegmentInfo, SegmentInfos, boolean, boolean, > int, boolean) line: 262 > SegmentReader.get(SegmentInfo) line: 197 > MultiSegmentReader.(Directory, SegmentInfos, boolean, SegmentReader[], > int[], Map) line: 109 > MultiSegmentReader.doReopen(SegmentInfos) line: 203 > DirectoryIndexReader$2.doBody(String) line: 98 > DirectoryIndexReader$2(SegmentInfos$FindSegmentsFile).run() line: 636 > MultiSegmentReader(DirectoryIndexReader).reopen() line: 92 > IndexReaderManager.reopenReader(FileProxy, IndexReader) line: 92 > IndexReaderManager.getIndexReader(FileProxy) line: 76 > IndexSearcherFactory.createIndexSearcher(FileProxy) line: 66 > > This exception is caught inside, however is it ok that the file is missin= g > or maybe there is some problem with usage? Please clarify. > > -- > View this message in context: http://lucene.472066.n3.nabble.com/reopen-w= ith-optimize-and-FileNotFoundException-tp2656875p2656875.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > 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