I'm trying to create a very simple Rest Client, as described in the docs.
I'm using maven with this dependency:
<dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>6.1.3</version> </dependency> RestClientBuilder builder = RestClient.builder( new HttpHost("localhost", 9200, "http")); RestHighLevelClient client = new RestHighLevelClient(builder);
But I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/lucene/util/Version at org.elasticsearch.Version.<clinit>(Version.java:44) ...
The org.apache.lucene.util.Version seems to be no longer part of the lucene-core dependency.
What can I do to solve this?
UPDATE: it turned out, that the local maven repos has some problems fetching the lucene jar, so that it was empty...