Hi Uwe,

>>> 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.
> 
> The old codecs are read-only! As said before, you can only specify the codec 
> for IndexWriter. That means new segemnts to already existing indexes will 
> automatically use the new codec. Old segments already in your index will stay 
> with the old codec, until they are merged away, in which case they are 
> implicitly upgraded.

Just to be clear: If lucene-backwards-codecs.jar 6.1 is on the classpath
(and gives me access to Lucene50Codec), can I specify the Lucene50Codec
in the IndexWriter's IndexWriterConfig and thus get Lucene 6.1 to write
an index compatible with Lucene 5.0?

> As the Lucene 5 codec is read only, it is impossible to create a new index 
> (or modify an existing index) in a way that it will still be readable with 
> Lucene 5. As soon as you touch an index with the new codec, it will be mixed 
> codec versions and cannot be read with old version. But Lucene 6 will happily 
> handle the mixed codec index - it is designed for that use case 
> (default-codec indexes will behave the same way). 😊

That's a cool feature and may work well for my use case. The only thing
I worry about is how ServiceLoader-based Codec discovery will work in an
OSGi environment (specially, an Eclipse plug-in).

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to