【问题标题】:Solr throws error on partial update after upgrade to 8.8Solr 升级到 8.8 后在部分更新时抛出错误
【发布时间】:2021-05-25 21:10:03
【问题描述】:

我正在做一个简单的部分更新方案,该方案适用于 Solr 版本 6.x 和 7.x。将 Solr 和 Solrj 都升级到 8.8 后,出现以下异常:

2021-02-23 14:57:58.201 ERROR (qtp-459670553-28) [   x:core1] o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: TransactionLog doesn't know how to serialize class org.apache.lucene.document.LazyDocument$LazyField; try implementing ObjectResolver?
    at org.apache.solr.update.TransactionLog$1.resolve(TransactionLog.java:100)
    at org.apache.solr.common.util.JavaBinCodec.writeVal(JavaBinCodec.java:266)
    at org.apache.solr.common.util.JavaBinCodec$BinEntryWriter.put(JavaBinCodec.java:441)
    at org.apache.solr.common.ConditionalKeyMapWriter$EntryWriterWrapper.put(ConditionalKeyMapWriter.java:44)
    at org.apache.solr.common.MapWriter$EntryWriter.putNoEx(MapWriter.java:101)
    at org.apache.solr.common.MapWriter$EntryWriter.lambda$getBiConsumer$0(MapWriter.java:161)
    at org.apache.solr.common.MapWriter$EntryWriter$$Lambda$548/0000000000000000.accept(Unknown Source)
    at org.apache.solr.common.SolrInputDocument.lambda$writeMap$0(SolrInputDocument.java:59)
    at org.apache.solr.common.SolrInputDocument$$Lambda$549/0000000000000000.accept(Unknown Source)
    .....

solrj 代码与here 提供的示例类似,并且在升级之前可以正常工作。该操作是为提供了 id 的文档添加一个简单的整数字段。

请注意,这与stackoverflow 上的上一个问题不同,因为我传递的是简单的整数字段,而在 solr/lucene 方面,它已替换为 org.apache.lucene.document.LazyDocument$LazyField

【问题讨论】:

    标签: solr solrj backwards-compatibility solr8


    【解决方案1】:

    似乎是 Solr https://issues.apache.org/jira/browse/SOLR-13034 中的一个错误,将在 solr 8 (8.9) 的下一版本中修复。

    在它发布之前,解决方法是在 solrconfig.xml 中设置 <enableLazyFieldLoading>false</enableLazyFieldLoading>

    【讨论】:

      猜你喜欢
      • 2014-07-02
      • 2013-05-25
      • 1970-01-01
      • 2020-10-05
      • 2021-01-21
      • 1970-01-01
      • 2021-03-08
      • 1970-01-01
      相关资源
      最近更新 更多