Apache Solr 核心架构从 4.x 升级到 5.x(或更高版本)
Apache Solr core schema upgrade from 4.x to 5.x (or later versions)
我正在将 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.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.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.call(CoreContainer.java:447)
at org.apache.solr.core.CoreContainer.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]
谁能帮我解决这个问题?
感谢副词
如果您删除数据目录(首先制作了一个副本),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 创建的,则没有必要这样做
我正在将 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.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.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.call(CoreContainer.java:447)
at org.apache.solr.core.CoreContainer.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]
谁能帮我解决这个问题?
感谢副词
如果您删除数据目录(首先制作了一个副本),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 创建的,则没有必要这样做