Unable to run solr 5 index upgrader

回眸只為那壹抹淺笑 提交于 2019-12-11 19:25:50

问题


I keep adding the classpath in the java command line yet I get this error. what could be the issue?

~/Documents/solr-5.5.5/server/solr-webapp/webapp/WEB-INF/lib $ java -classpath ./lucene-backward-codecs-5.5.5.jar -cp lucene-core-5.5.5.jar org.apache.lucene.index.IndexUpgrader -delete-prior-commits -verbose ~/Documents/zaobao_cms/collection1/data/index/
IW 0 [2019-01-17T13:39:11.649Z; main]: init: hit exception on init; releasing write lock
Exception in thread "main" java.lang.IllegalArgumentException: Could not load codec 'Lucene410'.  Did you forget to add lucene-backward-codecs.jar?
    at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:481)
    at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:361)
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:910)
    at org.apache.lucene.index.IndexUpgrader.upgrade(IndexUpgrader.java:167)
    at org.apache.lucene.index.IndexUpgrader.main(IndexUpgrader.java:78)
Caused by: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene410' does not exist.  You need to add the corresponding JAR file supporting this SPI to your classpath.  The current classpath supports the following names: [Lucene54]
    at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:114)
    at org.apache.lucene.codecs.Codec.forName(Codec.java:113)
    at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:469)
    ... 4 more

来源:https://stackoverflow.com/questions/54237232/unable-to-run-solr-5-index-upgrader

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!