我正在尝试通过SOLR和lucene来索引文档中的文件。 [英] I'm trying to index files in a document through SOLR and lucene..

查看:72
本文介绍了我正在尝试通过SOLR和lucene来索引文档中的文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如我在标题中所说:
i我正在使用Java,但是当我在Eclipse上运行代码时,我收到以下错误..

as i said in the title: i am using Java, but when I run the code on Eclipse, i get the following error..


线程main中的异常java.lang.NoClassDefFoundError:org / apache / lucene / analysis / util / ResourceLoader
在Indexer.getIndexWriter(Indexer.java:38)
在Indexer .rebuildIndexes(Indexer.java:73)
在SolrIndexer.main(SolrIndexer.java:23)
引起:java.lang.ClassNotFoundException:org.apache.lucene.analysis.util.ResourceLoader $ b $ java at java.net.URLClassLoader $ 1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java) :190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java:301)
at java。 lang.ClassLoader.loadClass(ClassLoader.java:247)
... 3更多

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/lucene/analysis/util/ResourceLoader at Indexer.getIndexWriter(Indexer.java:38) at Indexer.rebuildIndexes(Indexer.java:73) at SolrIndexer.main(SolrIndexer.java:23) Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.util.ResourceLoader at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 3 more

SAD PART: c> c> Lucene 4.0 / 3.6 / 4.0-ALPHA 。虽然,有一些网页,人们在谈论 resourceloader 类。

The SAD PART: the class org.apache.lucene.analysis.util.ResourceLoader is not available in Lucene 4.0/3.6/4.0-ALPHA. although, there are a few webpages where people are talking about the resourceloader class.

任何人都可以帮助我吗?任何帮助将不胜感激..

can anyone help me out here? Any help would be appreciated..

推荐答案

常用分析器已移动 lucene-analyzers-common-XXXjar LUCENE-2510 的结果


确保你在类路径中有它。

The common analysers have been move lucene-analyzers-common-X.X.X.jar as a result of LUCENE-2510
Ensure that you have it in your classpath.

这篇关于我正在尝试通过SOLR和lucene来索引文档中的文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆