RestHighLevelClient client = new RestHighLevelClient(RestClient.builder(new HttpHost("localhost", 9200, "http")));
My question is do we always need to use new HttpHost ? Is there a way where we can maintain a pool of connections ?
We are having GET and POST apis and client.search() is always called when there is a request triggered from front end. So everytime a new request is triggered a new connection is created. Is there a better approach of handling it. ?