Monti Chandra
Monti Chandra

Reputation: 442

Apache Solr core schema upgrade from 4.x to 5.x (or later versions)

I am migrating solr 4.x to 5.x. I have created same core on solr 5.x and copied old [corename]/data/index directory to [corename]/data/index. But getting the following exception.

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]

Can anyone help me to fix this issue?

Thx in adv.

Upvotes: 1

Views: 324

Answers (1)

David George
David George

Reputation: 3752

If you delete the data directory (having first made a copy) does Solr recreate an empty directory on startup?

If no, check your solrconfig.xml to see where the data directory is located

https://cwiki.apache.org/confluence/display/solr/DataDir+and+DirectoryFactory+in+SolrConfig

If yes, then probably a file is missing or there is some index incompatibility. Does your index still work with 4.0 if you copy it back?

You can always try running the IndexUpgrader on your 4.0 index to upgrade it to 5.0, although this shouldn't be necessary if your index was created with Solr 4.0

Upvotes: 1

Related Questions