Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using PreBuiltTransportClient with elasticsearch 5

I am trying to follow the official Elasticsearch 5 documentation for setting up a transport client:

https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.0/transport-client.html

However, using the package org.elasticsearch:elasticsearch:5.0.0-rc1, the class PreBuiltTransportClient does not appear to be anywhere in my path. It doesn't appear to exist. What should I do to configure a TransportClient? Do I need a separate package? Am I using the wrong version in Maven?

Thanks.

like image 474
Peter Avatar asked Oct 14 '16 14:10

Peter


1 Answers

You need to add a dependency on the transport artifact:

<dependency>
    <groupId>org.elasticsearch.client</groupId>
    <artifactId>transport</artifactId>
    <version>5.0.0-beta1</version>
</dependency>
like image 169
Val Avatar answered Oct 13 '22 09:10

Val