.put("http.enabled", false)
.build();
Node node = NodeBuilder.nodeBuilder().clusterName(clusterName).client(true).settings(settings).build();
node.start();
//unfortunately the es clients are not type safe, need to cast it
Client client = node.client();
if (! (client instanceof org.elasticsearch.client.node.NodeClient) ) {
throw new RuntimeException("Unable to create node client: the returned node isn't a NodeClient!");
}
org.elasticsearch.client.node.NodeClient nodeClient = (org.elasticsearch.client.node.NodeClient)client;
//if clusterKo we immediately close both the client and the node that we just created