java中,连接远程ES的方式是:
TransportClient client = new PreBuiltTransportClient(Settings.EMPTY)
.addTransportAddress(new TransportAddress(ES_IP, 9300))
现在某个远程地址是通过nginx代理出来的,
在端口号为9237的nginx里将es映射为内网中ES_IP:9300
所以访问方式是 http://NGINX_IP:9527/es
也就是多了一个es后缀
这种情况,如何创建TransportClient ?
修改nginx 配置比较简单
参考
http://dmouse.iteye.com/blog/...