lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: 5.x to 6.x migration: replacement for Lucene50Codec
Date Thu, 30 Mar 2017 07:26:21 GMT
Hi,

you have to define your own codec only during indexing, so you can just update that for the
migration. This then affects all new segments written to your index.

To read indexes, Lucene will automatically load the codec based on the names written to index
files. If you want to open 5.x indexes, the lucene-backwards-codecs.jar must be in classpath,
as lucene-core.jar does not contain the old codec. You would otherwise get some Exception.

Uwe

-----
Uwe Schindler
Achterdiek 19, D-28357 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Andreas Sewe [mailto:andreas.sewe@codetrails.com]
> Sent: Thursday, March 30, 2017 9:17 AM
> To: java-user@lucene.apache.org
> Cc: Adrien Grand <jpountz@gmail.com>
> Subject: Re: 5.x to 6.x migration: replacement for Lucene50Codec
> 
> Hi Adrien,
> 
> > If you move to Lucene 6.1, then this should be Lucene60Codec. More
> > generally that would be the same codec that is returned by
> Codec.getDefault.
> 
> I should have mentioned that I for compatibility reasons still need to
> be able to read/write indexes created with the old version, i.e., with
> the 5.0 codec.
> 
> As the org.apache.lucene.codecs.lucene50 package is still around, I
> think that this should be possible; there is just no ready-made Codec
> for me to use.
> 
> I hope this clarifies things.
> 
> Best wishes,
> 
> Andreas
> 
> --
> Codetrails GmbH
> The knowledge transfer company
> 
> Robert-Bosch-Str. 7, 64293 Darmstadt
> Phone: +49-6151-276-7092
> Mobile: +49-170-811-3791
> http://www.codetrails.com/
> 
> Managing Director: Dr. Marcel Bruch
> Handelsregister: Darmstadt HRB 91940



---------------------------------------------------------------------
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