我正在将solr 4.x迁移到5.x.我在solr 5.x上创建了相同的核心,并将旧的[corename] / data / index目录复制到[corename] / data / index。但得到以下异常。
java.util.concurrent.ExecutionException: org.apache.solr.common.SolrException: Unable to create core
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.apache.solr.core.CoreContainer$2.run(CoreContainer.java:476)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:210)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Unable to create core []
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:741)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:447)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:438)
... 5 more
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:820)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:659)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:727)
... 7 more
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1662)
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1773)
at org.apache.solr.core.SolrCore.initSearcher(SolrCore.java:916)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:793)
... 9 more
Caused by: org.apache.lucene.index.IndexNotFoundException: no segments* file found in LockValidatingDirectoryWrapper(NRTCachingDirectory(MMapDirectory@ lockFactory=org.apache.lucene.store.NativeFSLockFactory@6d76b8fa; maxCacheMB=48.0 maxMergeSizeMB=4.0)): files: [_fca_Lucene41_0.tip, _fc1_Lucene41_0.tim, _fcb_2.del, _fc1_Lucene41_0.tip, _fcb_Lucene41_0.pos, _fca_Lucene41_0.tim, _fca.si, _fc7.si, _fca_2.del, _fc2.nvm, _fcc.nvd, _fcb.si, _fc2.nvd, _fcc.nvm, _fc8.si, _fce.si, _fcc.fnm, _fcd.si, _fc1_Lucene41_0.doc, _fcd.fnm, _fc1.si, _fc1.nvd, _fc7.fdx, _fcd_Lucene41_0.pos, _fc7.fdt, _fc1.nvm, _fc2.fnm, _fca.fdx, _f56.si, _fc8_Lucene41_0.doc, _f56_Lucene41_0.doc, _fcc_Lucene41_0.doc, _fc9.fnm, _fcb_Lucene41_0.doc, _fcc_Lucene41_0.tim, _fcc_Lucene41_0.tip, _fc7_Lucene41_0.pos, _fc1.fdt, _fca.fdt, _fcd_1.del, _fcd_Lucene41_0.tip, _fcb.nvm, _fce_Lucene41_0.tim, _fcd_Lucene41_0.tim, _fc1.fdx, _fce_Lucene41_0.tip, _fcb.nvd, _fcc.fdt, _fcc.fdx, _fc8.fnm, _fca.fnm, _fcd.fdx, _fcd.fdt, _fcb.fdx, _fc7.nvm, _fc8.nvm, _fc9.nvd, segments.gen, _fc8_Lucene41_0.tim, nohup.out, _fcc_2.del, _fcc.si, _fc9.si, _fc7_Lucene41_0.tim, _f56.nvm, _fcd.nvm, _fc1.fnm, _fc9.nvm, _fc7.nvd, _fc8.nvd, _f56.nvd, _fcb.fdt, _fcd.nvd, _fca_Lucene41_0.pos, _fc9.fdt, _fce.fdx, _fce_Lucene41_0.doc, _fce.fdt, _fc8.fdx, _fc7_Lucene41_0.doc, _fca.nvm, _fc8.fdt, _fca.nvd, _fc9.fdx, _fc9_Lucene41_0.pos, _fce.nvm, _fc8_Lucene41_0.tip, _fc9_Lucene41_0.doc, _fc9_Lucene41_0.tim, _fc9_Lucene41_0.tip, _fc8_Lucene41_0.pos, _fcb.fnm, _fc2_8.del, _fce_Lucene41_0.pos, _fcb_Lucene41_0.tip, _fce.nvd, write.lock, _fcb_Lucene41_0.tim, _fc2_Lucene41_0.tip, _fc1_Lucene41_0.pos, _fc2.fdx, _fc2_Lucene41_0.tim, _fcd_Lucene41_0.doc, _fcc_Lucene41_0.pos, _f56_Lucene41_0.pos, _fc2_Lucene41_0.doc, _f56.fnm, _fce.fnm, _fc7_Lucene41_0.tip, _f56_Lucene41_0.tim, _fc2.fdt, _fca_Lucene41_0.doc, _f56_Lucene41_0.tip, _fc7.fnm, _fc2_Lucene41_0.pos, _fc2.si, _f56.fdt, _f56.fdx]
有人可以帮我解决这个问题吗?
先生。
答案 0 :(得分:1)
如果删除数据目录(首先复制了),Solr会在启动时重新创建一个空目录吗?
如果没有,请检查solrconfig.xml以查看数据目录的位置
https://cwiki.apache.org/confluence/display/solr/DataDir+and+DirectoryFactory+in+SolrConfig
如果是,则可能缺少文件或存在某些索引不兼容。如果您将其复制回来,您的索引是否仍适用于4.0?
您总是可以尝试在4.0索引上运行IndexUpgrader将其升级到5.0,但如果索引是使用Solr 4.0创建的,则不需要这样做