I am trying to index to a remote elastic host but RestHighLevelClient by default is picking up the "localhost:9200" . is there any where i can configure the RestHighLevelClient to use a remote host instead of localhost? I have researched enough on the internet but i could no find anything that could direct me regarding the remote host. I see "localhost" everywhere.
new RestHighLevelClient( RestClient.builder( new HttpHost("http://example.com")));
Any help would be appreciated.
Elastic Version : 6.2.3