Elasticsearch High REST Client Upgrade from 6.x to 7.x

402 views Asked by At

I am using Elasticsearch rest high level client (version 6.3.2) and I am trying to upgrade to Elasticsearch rest high level client (version 7.17.4)

I keep getting

error: cannot find symbol [ERROR] symbol: class XContentBuilder

I have added

<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>7.17.4</version> </dependency>

as well as the following two dependencies (which I didn't have to add in 6.x)

  <dependency>
      <groupId>org.elasticsearch.client</groupId>
      <artifactId>elasticsearch-rest-client</artifactId>
      <version>7.17.4</version>
  </dependency>       <dependency>
      <groupId>org.elasticsearch</groupId>
      <artifactId>elasticsearch</artifactId>
      <version>7.17.4</version>
  </dependency>
  <dependency>
      <groupId>org.elasticsearch</groupId>
      <artifactId>elasticsearch-x-content</artifactId>
      <version>7.17.4</version>       </dependency>

The error still persists. Any clue what else I need to be doing?

Thanks!

1

There are 1 answers

0
Tomasz Dzierżanowski On

this is dependency hell issue , can you print out your resolved dependencies to see which final version of elasticsearch is used? It can be you are using libs that need dependency to ELK6 and now you have provided 7. So you can spot them seeing dependency tree and then try to find newer versions of that libs which support ELK 7.