I am not sure which version you are using. I use 0.1.2, and factory I only have the setHttpClientConfig method. So I used HttpClientConfig , which extends ClientConfig . Note that the builder has two methods that you will need:
- discoveryEnabled
- discoveryFrequency
These are node node discovery settings and how often to poll.
HttpClientConfig httpClientConfig = new HttpClientConfig.Builder("http://localhost:9200")
.discoveryEnabled(true)
.discoveryFrequency(10l, TimeUnit.SECONDS)
.multiThreaded(true)
.build();
JestClientFactory factory = new JestClientFactory();
factory.setHttpClientConfig(httpClientConfig);
source
share