Having upgrade Elasticsearch 2.x to 5.x , I got the following message in eclipse:
The type org.elasticsearch.search.suggest.SuggestBuilder$SuggestionBuilder cannot be resolved. It is indirectly referenced from required .class files
and here is some snippet code from 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>
Most likely you got both ES libraries on the classpath and they are mixing together. Check the effective POM and do a proper cleanup. It is also possible that different ES lib is comming as a dependency with one of your other dependencies.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.