Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 39437 invoked from network); 16 Oct 2008 11:32:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Oct 2008 11:32:11 -0000 Received: (qmail 35739 invoked by uid 500); 16 Oct 2008 11:32:04 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 35717 invoked by uid 500); 16 Oct 2008 11:32:04 -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 35706 invoked by uid 99); 16 Oct 2008 11:32:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Oct 2008 04:32:04 -0700 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: local policy) Received: from [202.131.102.148] (HELO indiaserv01.asite.asitehq.com) (202.131.102.148) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Oct 2008 11:30:55 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: How to restore corrupted index Date: Thu, 16 Oct 2008 17:01:24 +0530 Message-ID: <0CD49D04A7B5534CA56257ADD9719EF703751240@indiaserv01.asite.asitehq.com> In-Reply-To: <0B7F1A83-825C-406B-AAE6-23028E777DC0@mikemccandless.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to restore corrupted index Thread-Index: Ackf5H2CRHH/h77eT8qZFgTxwBHSpQPnboew From: "Chaula Ganatra" To: X-Virus-Checked: Checked by ClamAV on apache.org Hi, I am again getting the following error while optimization. java.io.FileNotFoundException: \\machine01\indexes\_w5.cfs (The system cannot find the file specified) 16:20:57,533 INFO [STDOUT] : 140 at java.io.RandomAccessFile.open(Native Method) 16:20:57,533 INFO [STDOUT] : 140 at java.io.RandomAccessFile.(Unknown Source) 16:20:57,533 INFO [STDOUT] : 140 at org.apache.lucene.store.FSDirectory$FSIndexInput$Descriptor.(FSDir ectory.java:506) 16:20:57,533 INFO [STDOUT] : 140 at org.apache.lucene.store.FSDirectory$FSIndexInput.(FSDirectory.java :536) 16:20:57,565 INFO [STDOUT] : 140 at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445) 16:20:57,565 INFO [STDOUT] : 140 at org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.jav a:70) 16:20:57,565 INFO [STDOUT] : 140 at org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:181) 16:20:57,565 INFO [STDOUT] : 140 at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:167) 16:20:57,565 INFO [STDOUT] : 140 at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:139) 16:20:57,565 INFO [STDOUT] : 140 at org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:1867) 16:20:57,565 INFO [STDOUT] : 140 at org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:1231) If I try to optimize it again then also getting the same error. Can anyone please help me out? It is occurring on live environment. Regards, Chaula -----Original Message----- From: Michael McCandless [mailto:lucene@mikemccandless.com]=20 Sent: 26 September, 2008 8:00 PM To: java-user@lucene.apache.org Subject: Re: How to restore corrupted index It's perfectly fine to have a reader open on an index, while an =20 IndexWriter runs optimize. Which version of Lucene are you using? And which OS & filesystem? Mike Chaula Ganatra wrote: > It was the Reader on same index, which I did not close so gave =20 > exception > in writer.optimise() > > Chaula > > -----Original Message----- > From: Michael McCandless [mailto:lucene@mikemccandless.com] > Sent: 26 September, 2008 7:17 PM > To: java-user@lucene.apache.org > Subject: Re: How to restore corrupted index > > > Can you post the full stack trace in both cases? > > Mike > > Chaula Ganatra wrote: > >> I found one case when such multiple files are remained, when we call >> writer.optimise() it throws exception and multiple files remained in >> index dir. >> >> After such multiple files, when we add document in index by calling >> writer.addDocument it throws java.lang.NegativeArraySizeException >> >> Regards, >> Chaula >> >> -----Original Message----- >> From: Grant Ingersoll [mailto:gsingers@apache.org] >> Sent: 26 September, 2008 6:02 PM >> To: java-user@lucene.apache.org >> Subject: Re: How to restore corrupted index >> >> There is the CheckIndex tool included in the distribution for >> checking/ >> fixing bad indexes, but it can't solve everything. >> >> The bigger question is why it is happening to begin with. Can you >> describe your indexing process? How do you know the index is =20 >> actually >> corrupted? Are you seeing exceptions when opening it? >> >> -Grant >> On Sep 26, 2008, at 6:49 AM, Chaula Ganatra wrote: >> >>> We have an application in which index will be updated frequently. >>> >>> During development time, found that index files gets corrupted, i.e. >>> more than one cfs files,some other extension files e.g. frq, fnm, >>> nrm >>> >>> Remains there in index directory. >>> >>> Is there any way that such issue does not occur at all or if it >>> happens >>> we can recover the index data again? >>> >>> It would be a great help, if some one can. >>> >>> >>> >>> >>> >>> Regards, >>> >>> Chaula >>> >>> >>> >>> >>> >> >> -------------------------- >> Grant Ingersoll >> http://www.lucidimagination.com >> >> Lucene Helpful Hints: >> http://wiki.apache.org/lucene-java/BasicsOfPerformance >> http://wiki.apache.org/lucene-java/LuceneFAQ >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> 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 >> > > > --------------------------------------------------------------------- > 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 > --------------------------------------------------------------------- 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