简体   繁体   English

solr搜索无法解析导入的org.apache.solr.core.CoreContainer.Initializer

[英]The import org.apache.solr.core.CoreContainer.Initializer cannot be resolved in solr search

Creating the program solr search with eclipse and hibernate. 用eclipse和hibernate创建程序solr搜索。 I have used the below dependency in pom.xml file 我在pom.xml文件中使用了以下依赖项

<dependency>
    <groupId>org.apache.solr</groupId>
    <artifactId>solr-solrj</artifactId>
    <version>5.4.0</version>
</dependency>
<dependency>
    <groupId>org.apache.solr</groupId>
    <artifactId>solr-core</artifactId>
    <version>5.4.0</version>
</dependency>

I have imported import org.apache.solr.core.CoreContainer; 我已经导入import org.apache.solr.core.CoreContainer; but I am Getting error as CoreContainer.Initializer cannot be resolved to a type. 但由于CoreContainer.Initializer无法解析为类型,因此出现错误。

Seems like this class has been removed the new versions of Apache Solr. 好像该类已被删除的新版本的Apache Solr。 this inner class is not available within version 5.3.1 - http://lucene.apache.org/solr/5_3_1/solr-core/allclasses-noframe.html 此内部类在版本5.3.1中不可用-http: //lucene.apache.org/solr/5_3_1/solr-core/allclasses-noframe.html

whereas its available within version 4.2 - https://lucene.apache.org/solr/4_2_1/solr-core/allclasses-noframe.html 而在版本4.2中可用-https: //lucene.apache.org/solr/4_2_1/solr-core/allclasses-noframe.html

Make sure you are using the correct version. 确保使用正确的版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM