To connect to new Java API, this url:
https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/8.1/connecting.html
explains to do this :
// 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);
I guess that this example is on an unsecured cluster. bad ! bad ! bad!
From ES 8, It is mandatory to have clusters being secured with SSL dialog certificate: elastic-certificates.p12 and elastic-stack-ca.p12
Could you provide, please, a code snippet to show humanity How to connect to ES8, using Java API 8.1 and providing Credentials + SSL certificates
This would be very helpful, waiting for the official documentation.