Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 70772 invoked from network); 19 Aug 2004 09:30:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 19 Aug 2004 09:30:39 -0000 Received: (qmail 67652 invoked by uid 500); 19 Aug 2004 09:30:31 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 67606 invoked by uid 500); 19 Aug 2004 09:30:30 -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 67593 invoked by uid 99); 19 Aug 2004 09:30:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [203.199.26.74] (HELO daakghar.controlnet.co.in) (203.199.26.74) by apache.org (qpsmtpd/0.27.1) with SMTP; Thu, 19 Aug 2004 02:30:27 -0700 Received: from karthik ([192.168.4.1]) by dakiya.controlnet.co.in (Netscape Messaging Server 4.15) with ESMTP id I2OTOU00.12W for ; Thu, 19 Aug 2004 15:13:42 +0530 From: "Karthik N S" To: "Lucene Users List" Subject: RE: Restoring a corrupt index Date: Thu, 19 Aug 2004 15:11:41 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal In-Reply-To: <20040819083820.65748.qmail@web60810.mail.yahoo.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi George Do u think ,the same would work for MERGED Indexes.... Please Can u suggest a solution. Karthik -----Original Message----- From: Honey George [mailto:honey_george@yahoo.com] Sent: Thursday, August 19, 2004 2:08 PM To: Lucene Users List Subject: RE: Restoring a corrupt index This is what I did. There are 2 classes in the lucene source which are not public and therefore cannot be accessed from outside the package. The classes are 1. org.apache.lucene.index.SegmentInfos - collection of segments 2. org.apache.lucene.index.SegmentInfo -represents a sigle segment I took these two files and moved to a separate folder. Then created a class with the following code fragment. public void displaySegments(String indexDir) throws Exception { Directory dir = (Directory)FSDirectory.getDirectory(indexDir, false); SegmentInfos segments = new SegmentInfos(); segments.read(dir); StringBuffer str = new StringBuffer(); int size = segments.size(); str.append("Index Dir = " + indexDir ); str.append("\nTotal Number of Segments " + size); str.append("\n--------------------------------------"); for(int i=0;i wrote: > Hi Guys.... > > > In Our Situation we would be indexing Million & > Millions of Information > documents > > with Huge Giga Bytes of Data Indexed and > finally would be put into a > MERGED INDEX, Categorized accordingly. > > There may be a possibility of Corruption, So > Please do post the code > reffrals.... > > > Thx > Karthik > > > -----Original Message----- > From: Honey George [mailto:honey_george@yahoo.com] > Sent: Wednesday, August 18, 2004 5:51 PM > To: Lucene Users List > Subject: Re: Restoring a corrupt index > > > Thanks Erik, that worked. I was able to remove the > corrupt index and now it looks like the index is OK. > I > was able to view the number of documents in the > index. > Before that I was getting the error, > java.io.IOException: read past EOF > > I am yet to find out how my index got corrupted. > There > is another thread going on about this topic, > http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg03165.html > > If anybody is facing similar problem and is > interested > in the code I can post it here. > > Thanks, > George > > > > --- Erik Hatcher > wrote: > > The details of the segments file (and all the > > others) is freely > > available here: > > > > > > > http://jakarta.apache.org/lucene/docs/fileformats.html > > > > Also, there is Java code in Lucene, of course, > that > > manipulates the > > segments file which could be leveraged (although > > probably package > > scoped and not easily usable in a standalone > repair > > tool). > > > > Erik > > > > > > On Aug 18, 2004, at 6:50 AM, Honey George wrote: > > > > > Looks like problem is not with the hexeditor, > even > > in > > > the ultraedit(i had access to a windows box) I > am > > > seeing the same display. The problem is I am not > > able > > > to identify where a record starts with just 1 > > record > > > in the file. > > > > > > Need to try some alternate approach. > > > > > > Thanks, > > > George > > > > > > > ___________________________________________________________ALL-NEW > Yahoo! > Messenger - all new features - even more fun! > http://uk.messenger.yahoo.com > > --------------------------------------------------------------------- > 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 > > ___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com --------------------------------------------------------------------- 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