lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <>
Subject Re: Any compatiblity issue in the upgrade from Lucene Core 3.2.0 to Core 6.1.0?
Date Tue, 09 Aug 2016 02:31:53 GMT
On Mon, Aug 8, 2016 at 1:37 PM, Erick Erickson <> 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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message