code: public void connect() throws java.net.UnknownHostException {
          this.client = TransportClient.builder().settings(this.settings).build()
                  .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(this.es_host),
                          this.es_native_port));
      }
docs: Connect to ES.