You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Michael Wechner <mi...@wyona.com> on 2021/05/26 13:27:19 UTC

Index backwards compatibility

Hi

I am using Lucene 8.8.2 in production and I am currently doing some 
tests using 9.0.0-SNAPSHOT, whereas I have included 
lucene-backward-codecs, because in the log files it was asking me 
whether I have forgotten to include lucene-backward-codecs.jar

         <dependency>
             <groupId>org.apache.lucene</groupId>
             <artifactId>lucene-core</artifactId>
             <version>9.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.lucene</groupId>
             <artifactId>lucene-queryparser</artifactId>
             <version>9.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.lucene</groupId>
<artifactId>lucene-backward-codecs</artifactId>
             <version>8.8.2</version>
         </dependency>

But when querying index directories created with Lucene 8.8.2, then I 
receive the following error

java.lang.NoClassDefFoundError: Could not initialize class 
org.apache.lucene.codecs.Codec$Holder

I am not sure whether I understand the backwards compatibility page 
correctly

https://cwiki.apache.org/confluence/display/LUCENE/BackwardsCompatibility

but I guess version 9 will not be backwards compatible to version 8? Or 
should I do something different?

Thanks

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Index backwards compatibility

Posted by Michael Wechner <mi...@wyona.com>.
good point! I have changed it accordingly

https://cwiki.apache.org/confluence/display/LUCENE/LuceneFAQ#LuceneFAQ-WhenIupradeLucene,forexamplefrom8.8.2to9.0.0,doIhavetoreindex?

Hope it is clear now :-)

Am 27.05.21 um 16:39 schrieb Michael Sokolov:
> LGTM, but perhaps also should state that if possible you *should*
> update because the 8.x index may not be able to be read by the
> eventual 10 release.
>
> On Thu, May 27, 2021 at 7:52 AM Michael Wechner
> <mi...@wyona.com> wrote:
>> I have added a QnA
>>
>> https://cwiki.apache.org/confluence/display/LUCENE/LuceneFAQ#LuceneFAQ-WhenIupradeLucene,forexamplefrom8.8.2to9.0.0,doIhavetoreindex?
>>
>> Hope that makes sense, otherwise let me know and I can correct/update :-)
>>
>>
>>
>> Am 26.05.21 um 23:56 schrieb Michael Wechner:
>>> using lucene-backward-codecs-9.0.0-SNAPSHOT.jar makes it work :-)
>>>
>>> Thank you very much!
>>>
>>> But IIUC it is recommended to reindex when upgrading, right? I guess
>>> similar to what Solr is recommending
>>>
>>> https://solr.apache.org/guide/8_0/reindexing.html
>>>
>>>
>>> Am 26.05.21 um 21:26 schrieb Michael Sokolov:
>>>> I think you need backward-codecs-9.0.0-SNAPSHOT there. It enables 9.0
>>>> to read 8.x indexes.
>>>>
>>>> On Wed, May 26, 2021 at 9:27 AM Michael Wechner
>>>> <mi...@wyona.com> wrote:
>>>>> Hi
>>>>>
>>>>> I am using Lucene 8.8.2 in production and I am currently doing some
>>>>> tests using 9.0.0-SNAPSHOT, whereas I have included
>>>>> lucene-backward-codecs, because in the log files it was asking me
>>>>> whether I have forgotten to include lucene-backward-codecs.jar
>>>>>
>>>>>            <dependency>
>>>>>                <groupId>org.apache.lucene</groupId>
>>>>>                <artifactId>lucene-core</artifactId>
>>>>>                <version>9.0.0-SNAPSHOT</version>
>>>>>            </dependency>
>>>>>            <dependency>
>>>>>                <groupId>org.apache.lucene</groupId>
>>>>> <artifactId>lucene-queryparser</artifactId>
>>>>>                <version>9.0.0-SNAPSHOT</version>
>>>>>            </dependency>
>>>>>            <dependency>
>>>>>                <groupId>org.apache.lucene</groupId>
>>>>> <artifactId>lucene-backward-codecs</artifactId>
>>>>>                <version>8.8.2</version>
>>>>>            </dependency>
>>>>>
>>>>> But when querying index directories created with Lucene 8.8.2, then I
>>>>> receive the following error
>>>>>
>>>>> java.lang.NoClassDefFoundError: Could not initialize class
>>>>> org.apache.lucene.codecs.Codec$Holder
>>>>>
>>>>> I am not sure whether I understand the backwards compatibility page
>>>>> correctly
>>>>>
>>>>> https://cwiki.apache.org/confluence/display/LUCENE/BackwardsCompatibility
>>>>>
>>>>>
>>>>> but I guess version 9 will not be backwards compatible to version 8? Or
>>>>> should I do something different?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Michael
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>>
>> ---------------------------------------------------------------------
>> 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


Re: Index backwards compatibility

Posted by Michael Sokolov <ms...@gmail.com>.
... should *reindex*  ( not update )

On Thu, May 27, 2021 at 10:39 AM Michael Sokolov <ms...@gmail.com> wrote:
>
> LGTM, but perhaps also should state that if possible you *should*
> update because the 8.x index may not be able to be read by the
> eventual 10 release.
>
> On Thu, May 27, 2021 at 7:52 AM Michael Wechner
> <mi...@wyona.com> wrote:
> >
> > I have added a QnA
> >
> > https://cwiki.apache.org/confluence/display/LUCENE/LuceneFAQ#LuceneFAQ-WhenIupradeLucene,forexamplefrom8.8.2to9.0.0,doIhavetoreindex?
> >
> > Hope that makes sense, otherwise let me know and I can correct/update :-)
> >
> >
> >
> > Am 26.05.21 um 23:56 schrieb Michael Wechner:
> > > using lucene-backward-codecs-9.0.0-SNAPSHOT.jar makes it work :-)
> > >
> > > Thank you very much!
> > >
> > > But IIUC it is recommended to reindex when upgrading, right? I guess
> > > similar to what Solr is recommending
> > >
> > > https://solr.apache.org/guide/8_0/reindexing.html
> > >
> > >
> > > Am 26.05.21 um 21:26 schrieb Michael Sokolov:
> > >> I think you need backward-codecs-9.0.0-SNAPSHOT there. It enables 9.0
> > >> to read 8.x indexes.
> > >>
> > >> On Wed, May 26, 2021 at 9:27 AM Michael Wechner
> > >> <mi...@wyona.com> wrote:
> > >>> Hi
> > >>>
> > >>> I am using Lucene 8.8.2 in production and I am currently doing some
> > >>> tests using 9.0.0-SNAPSHOT, whereas I have included
> > >>> lucene-backward-codecs, because in the log files it was asking me
> > >>> whether I have forgotten to include lucene-backward-codecs.jar
> > >>>
> > >>>           <dependency>
> > >>>               <groupId>org.apache.lucene</groupId>
> > >>>               <artifactId>lucene-core</artifactId>
> > >>>               <version>9.0.0-SNAPSHOT</version>
> > >>>           </dependency>
> > >>>           <dependency>
> > >>>               <groupId>org.apache.lucene</groupId>
> > >>> <artifactId>lucene-queryparser</artifactId>
> > >>>               <version>9.0.0-SNAPSHOT</version>
> > >>>           </dependency>
> > >>>           <dependency>
> > >>>               <groupId>org.apache.lucene</groupId>
> > >>> <artifactId>lucene-backward-codecs</artifactId>
> > >>>               <version>8.8.2</version>
> > >>>           </dependency>
> > >>>
> > >>> But when querying index directories created with Lucene 8.8.2, then I
> > >>> receive the following error
> > >>>
> > >>> java.lang.NoClassDefFoundError: Could not initialize class
> > >>> org.apache.lucene.codecs.Codec$Holder
> > >>>
> > >>> I am not sure whether I understand the backwards compatibility page
> > >>> correctly
> > >>>
> > >>> https://cwiki.apache.org/confluence/display/LUCENE/BackwardsCompatibility
> > >>>
> > >>>
> > >>> but I guess version 9 will not be backwards compatible to version 8? Or
> > >>> should I do something different?
> > >>>
> > >>> Thanks
> > >>>
> > >>> Michael
> > >>>
> > >>> ---------------------------------------------------------------------
> > >>> 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
> > >
> >
> >
> > ---------------------------------------------------------------------
> > 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


Re: Index backwards compatibility

Posted by Michael Sokolov <ms...@gmail.com>.
LGTM, but perhaps also should state that if possible you *should*
update because the 8.x index may not be able to be read by the
eventual 10 release.

On Thu, May 27, 2021 at 7:52 AM Michael Wechner
<mi...@wyona.com> wrote:
>
> I have added a QnA
>
> https://cwiki.apache.org/confluence/display/LUCENE/LuceneFAQ#LuceneFAQ-WhenIupradeLucene,forexamplefrom8.8.2to9.0.0,doIhavetoreindex?
>
> Hope that makes sense, otherwise let me know and I can correct/update :-)
>
>
>
> Am 26.05.21 um 23:56 schrieb Michael Wechner:
> > using lucene-backward-codecs-9.0.0-SNAPSHOT.jar makes it work :-)
> >
> > Thank you very much!
> >
> > But IIUC it is recommended to reindex when upgrading, right? I guess
> > similar to what Solr is recommending
> >
> > https://solr.apache.org/guide/8_0/reindexing.html
> >
> >
> > Am 26.05.21 um 21:26 schrieb Michael Sokolov:
> >> I think you need backward-codecs-9.0.0-SNAPSHOT there. It enables 9.0
> >> to read 8.x indexes.
> >>
> >> On Wed, May 26, 2021 at 9:27 AM Michael Wechner
> >> <mi...@wyona.com> wrote:
> >>> Hi
> >>>
> >>> I am using Lucene 8.8.2 in production and I am currently doing some
> >>> tests using 9.0.0-SNAPSHOT, whereas I have included
> >>> lucene-backward-codecs, because in the log files it was asking me
> >>> whether I have forgotten to include lucene-backward-codecs.jar
> >>>
> >>>           <dependency>
> >>>               <groupId>org.apache.lucene</groupId>
> >>>               <artifactId>lucene-core</artifactId>
> >>>               <version>9.0.0-SNAPSHOT</version>
> >>>           </dependency>
> >>>           <dependency>
> >>>               <groupId>org.apache.lucene</groupId>
> >>> <artifactId>lucene-queryparser</artifactId>
> >>>               <version>9.0.0-SNAPSHOT</version>
> >>>           </dependency>
> >>>           <dependency>
> >>>               <groupId>org.apache.lucene</groupId>
> >>> <artifactId>lucene-backward-codecs</artifactId>
> >>>               <version>8.8.2</version>
> >>>           </dependency>
> >>>
> >>> But when querying index directories created with Lucene 8.8.2, then I
> >>> receive the following error
> >>>
> >>> java.lang.NoClassDefFoundError: Could not initialize class
> >>> org.apache.lucene.codecs.Codec$Holder
> >>>
> >>> I am not sure whether I understand the backwards compatibility page
> >>> correctly
> >>>
> >>> https://cwiki.apache.org/confluence/display/LUCENE/BackwardsCompatibility
> >>>
> >>>
> >>> but I guess version 9 will not be backwards compatible to version 8? Or
> >>> should I do something different?
> >>>
> >>> Thanks
> >>>
> >>> Michael
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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
> >
>
>
> ---------------------------------------------------------------------
> 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


Re: Index backwards compatibility

Posted by Michael Wechner <mi...@wyona.com>.
I have added a QnA

https://cwiki.apache.org/confluence/display/LUCENE/LuceneFAQ#LuceneFAQ-WhenIupradeLucene,forexamplefrom8.8.2to9.0.0,doIhavetoreindex?

Hope that makes sense, otherwise let me know and I can correct/update :-)



Am 26.05.21 um 23:56 schrieb Michael Wechner:
> using lucene-backward-codecs-9.0.0-SNAPSHOT.jar makes it work :-)
>
> Thank you very much!
>
> But IIUC it is recommended to reindex when upgrading, right? I guess 
> similar to what Solr is recommending
>
> https://solr.apache.org/guide/8_0/reindexing.html
>
>
> Am 26.05.21 um 21:26 schrieb Michael Sokolov:
>> I think you need backward-codecs-9.0.0-SNAPSHOT there. It enables 9.0
>> to read 8.x indexes.
>>
>> On Wed, May 26, 2021 at 9:27 AM Michael Wechner
>> <mi...@wyona.com> wrote:
>>> Hi
>>>
>>> I am using Lucene 8.8.2 in production and I am currently doing some
>>> tests using 9.0.0-SNAPSHOT, whereas I have included
>>> lucene-backward-codecs, because in the log files it was asking me
>>> whether I have forgotten to include lucene-backward-codecs.jar
>>>
>>>           <dependency>
>>>               <groupId>org.apache.lucene</groupId>
>>>               <artifactId>lucene-core</artifactId>
>>>               <version>9.0.0-SNAPSHOT</version>
>>>           </dependency>
>>>           <dependency>
>>>               <groupId>org.apache.lucene</groupId>
>>> <artifactId>lucene-queryparser</artifactId>
>>>               <version>9.0.0-SNAPSHOT</version>
>>>           </dependency>
>>>           <dependency>
>>>               <groupId>org.apache.lucene</groupId>
>>> <artifactId>lucene-backward-codecs</artifactId>
>>>               <version>8.8.2</version>
>>>           </dependency>
>>>
>>> But when querying index directories created with Lucene 8.8.2, then I
>>> receive the following error
>>>
>>> java.lang.NoClassDefFoundError: Could not initialize class
>>> org.apache.lucene.codecs.Codec$Holder
>>>
>>> I am not sure whether I understand the backwards compatibility page
>>> correctly
>>>
>>> https://cwiki.apache.org/confluence/display/LUCENE/BackwardsCompatibility 
>>>
>>>
>>> but I guess version 9 will not be backwards compatible to version 8? Or
>>> should I do something different?
>>>
>>> Thanks
>>>
>>> Michael
>>>
>>> ---------------------------------------------------------------------
>>> 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
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Index backwards compatibility

Posted by Michael Wechner <mi...@wyona.com>.
using lucene-backward-codecs-9.0.0-SNAPSHOT.jar makes it work :-)

Thank you very much!

But IIUC it is recommended to reindex when upgrading, right? I guess 
similar to what Solr is recommending

https://solr.apache.org/guide/8_0/reindexing.html


Am 26.05.21 um 21:26 schrieb Michael Sokolov:
> I think you need backward-codecs-9.0.0-SNAPSHOT there. It enables 9.0
> to read 8.x indexes.
>
> On Wed, May 26, 2021 at 9:27 AM Michael Wechner
> <mi...@wyona.com> wrote:
>> Hi
>>
>> I am using Lucene 8.8.2 in production and I am currently doing some
>> tests using 9.0.0-SNAPSHOT, whereas I have included
>> lucene-backward-codecs, because in the log files it was asking me
>> whether I have forgotten to include lucene-backward-codecs.jar
>>
>>           <dependency>
>>               <groupId>org.apache.lucene</groupId>
>>               <artifactId>lucene-core</artifactId>
>>               <version>9.0.0-SNAPSHOT</version>
>>           </dependency>
>>           <dependency>
>>               <groupId>org.apache.lucene</groupId>
>>               <artifactId>lucene-queryparser</artifactId>
>>               <version>9.0.0-SNAPSHOT</version>
>>           </dependency>
>>           <dependency>
>>               <groupId>org.apache.lucene</groupId>
>> <artifactId>lucene-backward-codecs</artifactId>
>>               <version>8.8.2</version>
>>           </dependency>
>>
>> But when querying index directories created with Lucene 8.8.2, then I
>> receive the following error
>>
>> java.lang.NoClassDefFoundError: Could not initialize class
>> org.apache.lucene.codecs.Codec$Holder
>>
>> I am not sure whether I understand the backwards compatibility page
>> correctly
>>
>> https://cwiki.apache.org/confluence/display/LUCENE/BackwardsCompatibility
>>
>> but I guess version 9 will not be backwards compatible to version 8? Or
>> should I do something different?
>>
>> Thanks
>>
>> Michael
>>
>> ---------------------------------------------------------------------
>> 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


Re: Index backwards compatibility

Posted by Michael Sokolov <ms...@gmail.com>.
I think you need backward-codecs-9.0.0-SNAPSHOT there. It enables 9.0
to read 8.x indexes.

On Wed, May 26, 2021 at 9:27 AM Michael Wechner
<mi...@wyona.com> wrote:
>
> Hi
>
> I am using Lucene 8.8.2 in production and I am currently doing some
> tests using 9.0.0-SNAPSHOT, whereas I have included
> lucene-backward-codecs, because in the log files it was asking me
> whether I have forgotten to include lucene-backward-codecs.jar
>
>          <dependency>
>              <groupId>org.apache.lucene</groupId>
>              <artifactId>lucene-core</artifactId>
>              <version>9.0.0-SNAPSHOT</version>
>          </dependency>
>          <dependency>
>              <groupId>org.apache.lucene</groupId>
>              <artifactId>lucene-queryparser</artifactId>
>              <version>9.0.0-SNAPSHOT</version>
>          </dependency>
>          <dependency>
>              <groupId>org.apache.lucene</groupId>
> <artifactId>lucene-backward-codecs</artifactId>
>              <version>8.8.2</version>
>          </dependency>
>
> But when querying index directories created with Lucene 8.8.2, then I
> receive the following error
>
> java.lang.NoClassDefFoundError: Could not initialize class
> org.apache.lucene.codecs.Codec$Holder
>
> I am not sure whether I understand the backwards compatibility page
> correctly
>
> https://cwiki.apache.org/confluence/display/LUCENE/BackwardsCompatibility
>
> but I guess version 9 will not be backwards compatible to version 8? Or
> should I do something different?
>
> Thanks
>
> Michael
>
> ---------------------------------------------------------------------
> 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