我正在尝试将Lucene索引从4.6升级到8.0.0。当我尝试使用以下工具升级工具时:
java -cp lucene-core.jar:lucene-backward-codecs.jar \
org.apache.lucene.index.IndexUpgrader -delete-prior-commits \
/scratch/***/workspaces/trunk/****/indexes/4.6/
脚本从4.6
到5.5.5
,5.5.5
到6.6.6
,6.6.6
到7.7.2
正常工作。但是,当我尝试从7.7.2
升级到8.0.0
时,会引发如下错误。
Exception in thread "main" org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/scratch/**/workspaces/trunk/**/indexes/4.6/sd/segments_9"))): 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.IndexWriter.<init>(IndexWriter.java:846)
at org.apache.lucene.index.IndexUpgrader.upgrade(IndexUpgrader.java:167)
at org.apache.lucene.index.IndexUpgrader.main(IndexUpgrader.java:78)
我们想从4.6
升级到8.0.0
。直到7.7.2
都在升级,没有任何问题,但是当我在代码索引中使用Lucene版本7.7.2
时工作正常。但是Lucene 8.0.0
无法正常工作。
请帮助我升级8.0.0
答案 0 :(得分:0)