Disable automatic discovery?
Closed this issue · 2 comments
Is it possible to disable automatic discovery of the cluster nodes? We have an ES cluster behind an NGINX proxy, and the driver is unable to connect to the cluster (2.3.5).
In the ElasticSearch Hadoop driver for example there is a setting called es.nodes.wan.only which disables auto-discovery - is there a way to do it with sql4es?
Thanks,
Dan
Hi Dan,
All parameters set in the connection url are passed to the Elasticsearch transport client used by the driver. Hence i think you can actieve what you want by setting sniffOnStart to false. To do this set the parameter in the url like this: jdbc:sql4es://host:port/index?sniffOnStart=false. Hope this helps!
Note: you can set more hosts using the es.hosts parameter as described at the bottom of the readme.md.
Thanks, I'll give it a try. I found out that the original issue I was having was due to the fact I was using the HTTP port rather than the transport port.