How to connect es cluster

// Create the low-level client
RestClient restClient = RestClient.builder(
    new HttpHost("localhost", 9200)).build();

// Create the transport with a Jackson mapper
ElasticsearchTransport transport = new RestClientTransport(
    restClient, new JacksonJsonpMapper());

// And create the API client
ElasticsearchClient client = new ElasticsearchClient(transport);

domo just show how to connect single node, but our service use es-cluster, so i want to know how to connect es cluster, who can help me :grinning:

I've fixed this issue

RestClient.builder(HttpHost... host)

this method support to pass an array


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.