加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – 如何打开一个Lucene 4.3索引?

发布时间:2020-12-14 05:40:46 所属栏目:Java 来源:网络整理
导读:我是Lucene的新手,我正在尝试使用Luke打开一个Lucene 4.3索引(我使用我的简单的Lucene 4.3.1应用程序创建),但它不断给我: Invalid directory at the location,check console for more information. Last exception: java.lang.IllegalArgumentException: A
我是Lucene的新手,我正在尝试使用Luke打开一个Lucene 4.3索引(我使用我的简单的Lucene 4.3.1应用程序创建),但它不断给我:

Invalid directory at the location,check console for more information.
Last exception: java.lang.IllegalArgumentException: A SPI class of
type org.apache.lucene.codecs.Codec with name ‘Lucene42’ does not
exist. You need to add the corresponding JAR file supporting this SPI
to your classpath.The current classpath supports the following names:
[Lucene40,Lucene3x,SimpleText,Appending]

精细.所以我设置了代码中使用的Lucene版本到Version.LUCENE_43.我也尝试过较早的3.x版本.我在这里做错了什么?有没有另一个可以使用的Lucene索引浏览器?

我使用java -jar lukeall-4.0.0-ALPHA.jar运行Luke,我告诉它打开我的应用程序正在生成的索引.

更新:

>我已经尝试将我的CLASSPATH设置为包括lucene-core:4.3.1:jar.那没有帮助
> Luke抛出这个错误:

java.lang.IllegalArgumentException:名称为“Lucene42”的类型为org.apache.lucene.codecs.Codec的SPI类不存在.您需要将支持此SPI的相应JAR文件添加到类路径中.当前类路径支持以下名称:[Lucene40,Appending]
java.lang.IllegalArgumentException:名称为“Lucene42”的类型为org.apache.lucene.codecs.Codec的SPI类不存在.您需要将支持此SPI的相应JAR文件添加到类路径中.当前类路径支持以下名称:[Lucene40,Appending]

非常感谢!

解决方法

有一个人花了他的时间来修复luke的lucene-4.3.1.

https://github.com/tarzanek/luke

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读