lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: IndexFormatTooOldException while upgrading Lucene 4.10 index to 5.2
Date Tue, 16 Jun 2015 09:47:25 GMT
Hi,

Sorry, I just noticed that you are using DirectDocValues format, which was experimental. You
cannot directly upgrade this to 5.0. I would suggest to convert your index to use the default
codec in 4.10 (e.g., by using addIndexes to a new index directory, or by forceMerge with an
IndexWriter that has default codec).

After that you can read the 4.10 index with 5.0 using lucene-backward-codecs.jar in classpath.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Uwe Schindler [mailto:uwe@thetaphi.de]
> Sent: Tuesday, June 16, 2015 11:35 AM
> To: java-user@lucene.apache.org
> Subject: RE: IndexFormatTooOldException while upgrading Lucene 4.10 index
> to 5.2
> 
> Hi,
> 
> you need to add the JAR file lucene-backward-codec.jar to the classpath (or
> add it via Maven). It contains the codecs to read pre-5.0 versions.
> 
> Uwe
> 
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
> 
> 
> > -----Original Message-----
> > From: Sven Teichmann [mailto:s.teichmann@s4ip.de]
> > Sent: Tuesday, June 16, 2015 10:34 AM
> > To: java-user@lucene.apache.org
> > Subject: IndexFormatTooOldException while upgrading Lucene 4.10 index
> > to
> > 5.2
> >
> > Today I tried to upgrade a Lucene 4.10 index to 5.2 using the
> IndexUpgrader.
> > This throws the following exception:
> >
> > Exception in thread "Lucene Merge Thread #0"
> > org.apache.lucene.index.MergePolicy$MergeException:
> > org.apache.lucene.index.IndexFormatTooOldException: Format version is
> > not supported (resource
> >
> BufferedChecksumIndexInput(MMapIndexInput(path="/data/title_lu5_en_
> > 201506/vol2/_0_Direct_0.dvdm"))):
> > 2 (needs to be between 3 and 3). This version of Lucene only supports
> > indexes created with release 4.0 and later.
> > 	at
> >
> org.apache.lucene.index.ConcurrentMergeScheduler.handleMergeExceptio
> > n(ConcurrentMergeScheduler.java:673)
> > 	at
> >
> org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(Co
> > ncurrentMergeScheduler.java:641)
> > Caused by: org.apache.lucene.index.IndexFormatTooOldException: Format
> > version is not supported (resource
> >
> BufferedChecksumIndexInput(MMapIndexInput(path="/data/title_lu5_en_
> > 201506/vol2/_0_Direct_0.dvdm"))):
> > 2 (needs to be between 3 and 3). This version of Lucene only supports
> > indexes created with release 4.0 and later.
> > 	at
> >
> org.apache.lucene.codecs.CodecUtil.checkHeaderNoMagic(CodecUtil.java:2
> > 14)
> > 	at
> > org.apache.lucene.codecs.CodecUtil.checkHeader(CodecUtil.java:199)
> > 	at
> >
> org.apache.lucene.codecs.CodecUtil.checkIndexHeader(CodecUtil.java:256)
> > 	at
> >
> org.apache.lucene.codecs.memory.DirectDocValuesProducer.<init>(DirectD
> > ocValuesProducer.java:126)
> > 	at
> >
> org.apache.lucene.codecs.memory.DirectDocValuesFormat.fieldsProducer(D
> > irectDocValuesFormat.java:76)
> > 	at
> >
> org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat$FieldsReader.
> > <init>(PerFieldDocValuesFormat.java:268)
> > 	at
> > org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat.fieldsProduc
> > er
> > (PerFieldDocValuesFormat.java:358)
> > 	at
> >
> org.apache.lucene.index.SegmentDocValues.newDocValuesProducer(Segm
> > entDocValues.java:51)
> > 	at
> >
> org.apache.lucene.index.SegmentDocValues.getDocValuesProducer(Segme
> > ntDocValues.java:67)
> > 	at
> >
> org.apache.lucene.index.SegmentReader.initDocValuesProducer(SegmentR
> > eader.java:141)
> > 	at
> > org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:81)
> > 	at
> >
> org.apache.lucene.index.ReadersAndUpdates.getReader(ReadersAndUpdat
> > es.java:132)
> > 	at
> >
> org.apache.lucene.index.ReadersAndUpdates.getReaderForMerge(Readers
> > AndUpdates.java:604)
> > 	at
> >
> org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:3893)
> > 	at
> > org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:3543)
> > 	at
> >
> org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(Concurrent
> > MergeScheduler.java:581)
> > 	at
> >
> org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(Co
> > ncurrentMergeScheduler.java:619)
> >
> >
> > We use DirectDocValuesFormat for two fields and I think that this is
> > the problem.
> >
> > Any ideas how to upgrade the index to 5.2 anyway?
> >
> > Thanks for your help!
> >
> > Sven
> >
> > ---------------------------------------------------------------------
> > 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


Mime
View raw message