gpt4 book ai didi

java - 从 4.7 升级到 7.1 后的 Solr 索引问题

转载 作者:行者123 更新时间:2023-11-29 04:23:54 28 4
gpt4 key购买 nike

我刚刚将我们的 solr 从 4.7 升级到 7.1。我将旧文件夹名称“old_core”(包含文件夹:“index”、“snapshot_metadata”和“tlog”)复制到数据文件夹中。我还通过新的 solr UI 创建了一个新的核心。

启动 solr 时,我收到一条错误消息(在 UI 上):old_core:org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:打开新搜索器时出错

我发现,当我将子文件夹“index”从“new_core”复制到“old_core”文件夹时,它会在没有任何错误消息的情况下启动。

这是否意味着 solr 4.7 版本的索引不能转移到 7.1 版本?有办法解决吗?它是否安全或可能会损坏索引?

日志错误:
简短:

Caused by: org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/data/solr/sst1_1/index/segments_5"))): 1 (needs to be between 6 and 7). This version of Lucene only supports indexes created with release 6.0 and later.

完整:>

ERROR - 2017-11-23 10:05:57.182; org.apache.solr.core.CoreContainer; Error waiting for SolrCore to be created
java.util.concurrent.ExecutionException: org.apache.solr.common.SolrException: Unable to create core [sst1_1]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.solr.core.CoreContainer.lambda$load$14(CoreContainer.java:671)
at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:188)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.solr.common.SolrException: Unable to create core [sst1_1]
at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1045)
at org.apache.solr.core.CoreContainer.lambda$load$13(CoreContainer.java:642)
at com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:197)
... 5 more
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:989)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:844)
at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1029)
... 7 more
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2076)
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:2196)
at org.apache.solr.core.SolrCore.initSearcher(SolrCore.java:1072)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:961)
... 9 more
Caused by: org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/data/solr/sst1_1/index/segments_5"))): 1 (needs to be between 6 and 7). This version of Lucene only supports indexes created with release 6.0 and later.
at org.apache.lucene.codecs.CodecUtil.checkHeaderNoMagic(CodecUtil.java:213)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:305)
at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:289)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1076)
at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:119)
at org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:94)
at org.apache.solr.update.DefaultSolrCoreState.createMainIndexWriter(DefaultSolrCoreState.java:257)
at org.apache.solr.update.DefaultSolrCoreState.getIndexWriter(DefaultSolrCoreState.java:131)
at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2037)
... 12 more
ERROR - 2017-11-23 10:05:59.235; org.apache.solr.update.SolrIndexWriter; SolrIndexWriter was not closed prior to finalize(), indicates a bug -- POSSIBLE RESOURCE LEAK!!!
ERROR - 2017-11-23 10:05:59.236; org.apache.solr.update.SolrIndexWriter; Error closing IndexWriter
java.lang.NullPointerException
at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3583)
at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3545)
at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:1272)
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1317)
at org.apache.solr.update.SolrIndexWriter.close(SolrIndexWriter.java:280)
at org.apache.solr.update.SolrIndexWriter.finalize(SolrIndexWriter.java:336)
at java.lang.System$2.invokeFinalize(System.java:1270)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:98)
at java.lang.ref.Finalizer.access$100(Finalizer.java:34)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:210)

提前致谢!
迈克

最佳答案

您无法在一次升级中升级那么多版本。 Solr (Lucene) 只支持以前版本的索引格式,所以你可能需要自己做每个版本。

有一个与 Solr 捆绑在一起的工具 help you do this - the IndexUpgrader .

还有 a helpful script to automate migration from 4.x and onwards .

如有必要,请一如既往地备份您的索引。另请记住,某些字段类型可能不再可用,或者字段类型已更改(并引入了可能默认启用的新功能)。

如果可以重建索引,那是首选的升级路径。

关于java - 从 4.7 升级到 7.1 后的 Solr 索引问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47454434/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com