将Elasticsearch 2.x升级到5.x后,我在eclipse中收到以下消息:
The type org.elasticsearch.search.suggest.SuggestBuilder$SuggestionBuilder cannot be resolved. It is indirectly referenced from required .class files
以下是pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
</parent>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
<version>5.5.1</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
</dependency>
答案 0 :(得分:0)
很可能你在类路径上有两个ES库,它们混合在一起。检查有效的POM并进行适当的清理。也可能有不同的ES lib作为依赖项与您的其他依赖项之一。