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 郑文兴 <zh...@csdn.net> on 2016/08/08 03:16:27 UTC

Any compatiblity issue in the upgrade from Lucene Core 3.2.0 to Core 6.1.0?

Dear all,

 

Our project is still running on Lucene Core 3.2.0, which is a little too
old. If we wanna upgrade the version from 3.2.0 to 6.1.0, is there any
compatibility issue, which requires some special actions?

 

Appreciated for your advice

 

Regards, Wenxing


Re: Any compatiblity issue in the upgrade from Lucene Core 3.2.0 to Core 6.1.0?

Posted by Trejkaz <tr...@trypticon.org>.
On Tue, Aug 9, 2016 at 12:36 PM, 郑文兴 <zh...@csdn.net> wrote:
> Then it sounds like that "re-index all the sources in 6.x" is the most feasible way, :(.

If you can, that's what I would do. There are newer features you'll
want to use anyway and migrating in doc values and the like is not the
easiest thing in the world.

In our case, we had no source material to reindex from, so we had to
do it all the hard way.

TX

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


RE: Any compatiblity issue in the upgrade from Lucene Core 3.2.0 to Core 6.1.0?

Posted by 郑文兴 <zh...@csdn.net>.
Then it sounds like that "re-index all the sources in 6.x" is the most feasible way, :(. 

-----Original Message-----
From: Trejkaz [mailto:trejkaz@trypticon.org] 
Sent: Tuesday, August 09, 2016 10:32 AM
To: Lucene Users Mailing List
Subject: Re: Any compatiblity issue in the upgrade from Lucene Core 3.2.0 to Core 6.1.0?

On Mon, Aug 8, 2016 at 1:37 PM, Erick Erickson <er...@gmail.com> wrote:
> Yes. Lucene only guarantees back-compatibility with indexes for one 
> major version. That is, a 4.x release can read a 3.x Lucene index. But 
> a 5.x will not read a 3.x.
>
> So you have some options here:
> 1> re-index all your source in 6.x. This is probably easiest....
> 2> upgrade in stages, check out the IndexUpgradeTool.
> Here's the doc for 4.x, which should the 3.x version.
>
> I'll leave it to the people who know Lucene better than me to opine 
> about whether running the IndexUpgrader several times in succession 
> works well.

One problem is that IndexUpgrader and the rest of Lucene has the same package name in all the subsequent versions. So there is a fiddly bit of renaming the packages in order to get it all into one classpath.
Actually figuring out how to call the upgrader each time was also a bit interesting, given that by renaming the packages, the Directory class had to be adapted in interesting ways to eventually call through to the current Lucene's version of the Directory class. I think the InfoStream had some interesting adapting challenges as well.

But even then... I'm not sure IndexUpgrader is 100% flawless. We had one issue initially where it wasn't upgrading empty indexes at all, which I think is fixed now. More recently I think we have hit a case where a failure occurred due to the index being corrupt, but the upgrade method returned as if it was completely successful... almost like it was doing the merges in the background, but not waiting until they complete.

TX

---------------------------------------------------------------------
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: Any compatiblity issue in the upgrade from Lucene Core 3.2.0 to Core 6.1.0?

Posted by Trejkaz <tr...@trypticon.org>.
On Mon, Aug 8, 2016 at 1:37 PM, Erick Erickson <er...@gmail.com> wrote:
> Yes. Lucene only guarantees back-compatibility with
> indexes for one major version. That is, a 4.x release can
> read a 3.x Lucene index. But a 5.x will not read a 3.x.
>
> So you have some options here:
> 1> re-index all your source in 6.x. This is probably easiest....
> 2> upgrade in stages, check out the IndexUpgradeTool.
> Here's the doc for 4.x, which should the 3.x version.
>
> I'll leave it to the people who know Lucene better than me
> to opine about whether running the IndexUpgrader several
> times in succession works well.

One problem is that IndexUpgrader and the rest of Lucene has the same
package name in all the subsequent versions. So there is a fiddly bit
of renaming the packages in order to get it all into one classpath.
Actually figuring out how to call the upgrader each time was also a
bit interesting, given that by renaming the packages, the Directory
class had to be adapted in interesting ways to eventually call through
to the current Lucene's version of the Directory class. I think the
InfoStream had some interesting adapting challenges as well.

But even then... I'm not sure IndexUpgrader is 100% flawless. We had
one issue initially where it wasn't upgrading empty indexes at all,
which I think is fixed now. More recently I think we have hit a case
where a failure occurred due to the index being corrupt, but the
upgrade method returned as if it was completely successful... almost
like it was doing the merges in the background, but not waiting until
they complete.

TX

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


RE: Any compatiblity issue in the upgrade from Lucene Core 3.2.0 to Core 6.1.0?

Posted by 郑文兴 <zh...@csdn.net>.
Thanks to Erick. So you mean that we can use the IndexUpgrader to:
	Upgrade the index from 3.x to 4.x
	And then upgrade from 4.x to 5.x
	Finally we upgrade the index from 5.x to 6.x

Do we need to upgrade the application for each stage? Or we just need to build our application with 6.x? 

Kind Regards, Wenxing

-----Original Message-----
From: Erick Erickson [mailto:erickerickson@gmail.com] 
Sent: Monday, August 08, 2016 11:37 AM
To: java-user
Subject: Re: Any compatiblity issue in the upgrade from Lucene Core 3.2.0 to Core 6.1.0?

Yes. Lucene only guarantees back-compatibility with
indexes for one major version. That is, a 4.x release can
read a 3.x Lucene index. But a 5.x will not read a 3.x.

So you have some options here:
1> re-index all your source in 6.x. This is probably easiest....
2> upgrade in stages, check out the IndexUpgradeTool.
Here's the doc for 4.x, which should the 3.x version.

I'll leave it to the people who know Lucene better than me
to opine about whether running the IndexUpgrader several
times in succession works well.

Best,
Erick

On Sun, Aug 7, 2016 at 8:16 PM, 郑文兴 <zh...@csdn.net> wrote:
> Dear all,
>
>
>
> Our project is still running on Lucene Core 3.2.0, which is a little too
> old. If we wanna upgrade the version from 3.2.0 to 6.1.0, is there any
> compatibility issue, which requires some special actions?
>
>
>
> Appreciated for your advice
>
>
>
> Regards, Wenxing
>

---------------------------------------------------------------------
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: Any compatiblity issue in the upgrade from Lucene Core 3.2.0 to Core 6.1.0?

Posted by Erick Erickson <er...@gmail.com>.
Yes. Lucene only guarantees back-compatibility with
indexes for one major version. That is, a 4.x release can
read a 3.x Lucene index. But a 5.x will not read a 3.x.

So you have some options here:
1> re-index all your source in 6.x. This is probably easiest....
2> upgrade in stages, check out the IndexUpgradeTool.
Here's the doc for 4.x, which should the 3.x version.

I'll leave it to the people who know Lucene better than me
to opine about whether running the IndexUpgrader several
times in succession works well.

Best,
Erick

On Sun, Aug 7, 2016 at 8:16 PM, 郑文兴 <zh...@csdn.net> wrote:
> Dear all,
>
>
>
> Our project is still running on Lucene Core 3.2.0, which is a little too
> old. If we wanna upgrade the version from 3.2.0 to 6.1.0, is there any
> compatibility issue, which requires some special actions?
>
>
>
> Appreciated for your advice
>
>
>
> Regards, Wenxing
>

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