【问题标题】:An SPI class of type org.apache.lucene.codecs.DocValuesFormat with name 'Memory' does not exist名称为“内存”的 org.apache.lucene.codecs.DocValuesFormat 类型的 SPI 类不存在
【发布时间】:2022-01-17 09:50:19
【问题描述】:

得到错误:

Diag message: User class threw exception: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.DocValuesFormat with name 'Memory' does not exist.
You need to add the corresponding JAR file supporting this SPI to your classpath.
The current classpath supports the following names: [Lucene54]
      at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:116)
      at org.apache.lucene.codecs.DocValuesFormat.forName(DocValuesFormat.java:108)

我尝试使用各种较新版本的 lucene-core(以及向后兼容的 jar)运行 jar,但没有成功。目前,我们使用的是 6.5.0 版本。 我们尝试读取的 Lucene-index 包含像 - _4o08_Memory_0.mdvd 和 _4o08_Memory_0.mdvm 这样的文件,这是真正的问题。

【问题讨论】:

    标签: java lucene


    【解决方案1】:

    解决方案 - 添加 maven 依赖 https://mvnrepository.com/artifact/org.apache.lucene/lucene-codecs/6.5.0 并确保它是运行时依赖且不限于测试范围。

    【讨论】:

      猜你喜欢
      • 2016-11-16
      • 1970-01-01
      • 1970-01-01
      • 2020-03-05
      • 2013-08-05
      • 1970-01-01
      • 2020-03-31
      • 2010-12-04
      • 1970-01-01
      相关资源
      最近更新 更多