行动是治愈恐惧的良药,而犹豫、拖延将不断滋养恐惧。

在使用es时,TransportClient不能使用builder()了,如下,请问最新的写法是什么(我用的es6.5.4)?

Elasticsearch | 作者 LovelyTZ | 发布于2019年09月19日 | 阅读数:2153


Client client = TransportClient.builder().settings(settings).build() .addTransportAddress(new TransportAddress(inetAddress,9300));
已邀请:

Extreme_

赞同来自:

client = new PreBuiltTransportClient(settings) 
              .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(HOST_IP), TCP_PORT));
应该是这样,我(萌新)刚好学到这里。

要回复问题请先登录注册