how to use TransportClient in 5.4.2 with search guard

version:

elasticsearch-5.4.2
search-guard-5-5.4.2-13.zip

TransportClient.builder().settings(settings).addPlugin(SearchGuardSSLPlugin.class).build() ; this method is in es 2.x,but not in es 5.x

how to configure transportclient with search-guard 5.4.2 and elasticsearch 5.4.2

Hi, create TransportClient this way:

new PreBuiltTransportClient(settings, SearchGuardPlugin.class)
    .addTransportAddress(
            new InetSocketTransportAddress(InetAddress.getByName(elasticsearch.getMasterAddress()),
                    elasticsearch.getPort()));
ยทยทยท

On Friday, July 14, 2017 at 6:53:45 AM UTC+4:30, zhangxu...@gmail.com wrote:

version:

elasticsearch-5.4.2
search-guard-5-5.4.2-13.zip

TransportClient.builder().settings(settings).addPlugin(SearchGuardSSLPlugin.class).build() ; this method is in es 2.x,but not in es 5.x

how to configure transportclient with search-guard 5.4.2 and elasticsearch 5.4.2