lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Solr 8.0.0 + IndexUpgrader
Date Mon, 01 Apr 2019 15:32:42 GMT
As of Lucene 6, a marker was written into each segment, and when segments are merged the lowest
marker is preserved. If any marker for version of Lucene X-2 is found, you will see the error
you see.

This has been a source of considerable confusion. The guarantee of “one major revision backwards
compatability” has always actually meant that in a case like yours, say from Lucene 5x ->
7x, you wouldn’t get a failure, but you _would_ get subtle errors.

From Robert Muir:
“...Because it is a lossy index and does not retain all of the user's data, its not possible
to safely migrate some things automagically…"

IndexUpgraderTool does not actually change this restriction. All it does is insure that all
segments were written by the current version. It cannot recreate data that’s not there in
the first place.

Your only choice at this point is to fully re-index.

Best,
Erick

> On Apr 1, 2019, at 8:19 AM, Herbert Hackelsberger <hah@technodat.at> wrote:
> 
> Hi,
> 
> I tried to upgrade my test index from Solr 7.7.1 to Solr 8.0.0.
> The file segments_4h7 already contains the string Lucene70.
> I upgraded before with this command:
> 
> java -cp lucene-core-7.7.1.jar;lucene-backward-codecs-7.7.1.jar org.apache.lucene.index.IndexUpgrader
C:\solr\server\solr\syneris\data\index\
> 
> Everything went successful, when I start solr via solr.cmd start, no errors are logged.
> Now, when I try to upgrade to Solr 8 I also tried to upgraded the index with the following
command:
> 
> java -cp lucene-core-8.0.0.jar;lucene-backward-codecs-8.0.0.jar org.apache.lucene.index.IndexUpgrader
C:\solr\server\solr\syneris\data\index\
> 
> But I always get an exception:
> 
> Exception in thread "main" org.apache.lucene.index.IndexFormatTooOldException: Format
version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="C:\solr\server\solr\syneris\data\index\segments_4h7"))):
This index was initially created with Lucene 6.x while the current version is 8.0.0 and Lucene
only supports reading the current and previous major versions.. This version of Lucene only
supports indexes created with release 7.0 and later.
>        at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:318)
>        at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:289)
>        at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:432)
>        at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:429)
>        at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:680)
>        at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:632)
>        at org.apache.lucene.index.SegmentInfos.readLatestCommit(SegmentInfos.java:434)
>        at org.apache.lucene.index.DirectoryReader.listCommits(DirectoryReader.java:260)
>        at org.apache.lucene.index.IndexUpgrader.upgrade(IndexUpgrader.java:158)
>        at org.apache.lucene.index.IndexUpgrader.main(IndexUpgrader.java:78)
> 
> Any ideas, without performing a full reindex?
> 
> 
> Mit freundlichen Grüßen
> 
> Herbert Hackelsberger
> Kundensupport/Qualitätssicherung
> ______________________________________
> TECHNODAT Technische Datenverarbeitung GmbH
> Jakob-Haringer-Straße 6
> 5020  Salzburg / Austria
> 
> T  | +43 (0)662 2282-141
> F  | +43 (0)662 2282-9
> E  | hah@technodat.at<mailto:hah@technodat.at>
> W | www.technodat.at
> 
> Rechtsform: GmbH; Firmensitz: Salzburg
> Firmenbuchgericht: Landesgericht Salzburg
> FN 64072z; DVR: 0481831; UID-Nr. ATU33826508
> 


Mime
View raw message