Hello!
I am writing a Java program to work with Elasticsearch server.
My Java client version is 7.17.4, server version is 7.17.0.
Consider the following code:
RestClient restClient = RestClient.builder(new HttpHost("host.org", 9200, "https")).build();
ElasticsearchTransport transport = new RestClientTransport(restClient, new JacksonJsonpMapper());
ElasticsearchIndicesClient indicesClient = new ElasticsearchIndicesClient(transport);
indicesClient.delete(b -> b.index("non-existent-index"));
I see the following exception on console (pretty valid):
Exception in thread "main" co.elastic.clients.elasticsearch._types.ElasticsearchException: [es/indices.delete] failed: [index_not_found_exception] no such index [non-existent-index]
at co.elastic.clients.transport.rest_client.RestClientTransport.getHighLevelResponse(RestClientTransport.java:281)
at co.elastic.clients.transport.rest_client.RestClientTransport.performRequest(RestClientTransport.java:147)
at co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesClient.delete(ElasticsearchIndicesClient.java:382)
at co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesClient.delete(ElasticsearchIndicesClient.java:398)
but the program hungs forever.
Why?
Thanks in advance.