I followed the usual procedure in adding the dependency for the es high level rest client, but it seems like maven is ignoring it completely. Here's my pom config -
<dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>${elasticsearch.version}</version> <exclusions> <exclusion> <groupId>org.yaml</groupId> <artifactId>snakeyaml</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>transport</artifactId> <version>${elasticsearch.version}</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>>${elasticsearch.version}</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-client</artifactId> <version>${elasticsearch.version}</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-client-sniffer</artifactId> <version>${elasticsearch.version}</version> </dependency> We are also using spring boot too, but that should not be an issue here, as it is downloading all es dependencies except the high level rest client. The version is 6.8.7. Please help.
UPDATE:
I resolved this by creating a new project, basically there were some conflicts in the existing project and I am yet to debug that.
11 Answer
Please find snippet of my pom below and, important, I would highly recommend to start using version 7 of the Rest High Level Client library. We ran into major problems (mostly load-related) when using version 6 and Elastic decided for a full rewrite of their library.
<dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>7.4.0</version> </dependency> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>7.4.0</version> </dependency>