Thank you, I indeed use newer version of Lucli by mistake.

-----Original Message-----
From: Michael McCandless [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 29, 2007 6:30 PM
To: java-user@lucene.apache.org
Subject: Re: CorruptIndexException


That exception means your index was written with a newer version of
Lucene than the version you are using to open the IndexReader.

It looks like you used the unreleased (2.3 dev) version of Lucli from
the Lucene trunk and then went back to an older Lucene JAR (maybe 2.2?)
for accessing it?  In general writing an index with a newer version
of Lucene and then trying to access it using an older version of Lucene
doesn't work (whereas the opposite does).

I'm afraid you either have to switch to 2.3-dev for reading your index
(but beware it could have sneaky bugs ...), or, rebuild your index with
the 2.2 version of Lucene and use the 2.2 Lucli in the future.

Mike
 
"Melanie Langlois" <[EMAIL PROTECTED]> wrote:
> Hi,
> 
>  
> 
> I use Lucli to optimize my index, when my application was stopped. And
> after restarting my application, I could not serahc my index anymore, I
> got the following exception :
> 
>  
> 
> org.apache.lucene.index.CorruptIndexException: Unknown format version: -4
> 
>         at
>         org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:204)
> 
>         at
>         org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:190)
> 
>         at
>         
> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:610)
> 
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:185)
> 
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:167)
> 
>  
> 
> I have two questions:
> 
> -why does it occurs ? Should I use another tool to access the index
> outside of my application ?
> 
> -do there is way to recover ?
> 
>  
> 
>  
> 
> Thanks,
> 
>  
> 
> Mélanie
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to