Initializing a RestHighLevelClient for ElasticSearch

(anna) #1

In the documentation here, they initialize an instance of the client with the following code:

RestHighLevelClient client = new RestHighLevelClient(
                new HttpHost("localhost", 9200, "http"),
                new HttpHost("localhost", 9201, "http")));

I've configured my ElasticSearch instance on the AWS Console following these instructions. On the summary page for my newly created instance, there is no port number with the domain.

So my question is, given how I've configured my instance how can I set up and make requests using a RestHighLevelClient if I'm not running the instance locally? I've tried

 RestHighLevelClient myRestHighLevelClient = new RestHighLevelClient(
                        new HttpHost(ELASTIC_ENDPOINT_DEV)

        GetRequest getRequest = new GetRequest("myIndex", "myType","myID");

But I am returned with a Connection Refused. Please help!

(David Pilato) #2

You should ask AWS support for this.

Did you look at and ?

Cloud by elastic is the only way to have access to X-Pack. Think about what is there yet like Security, Monitoring, Reporting and what is coming like Canvas, SQL... And 6.3.0 is yet available there!

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.