4

I am trying to use Jest Client for REST calls for elastic search. I am getting the following error in line JestClient client = factory.getObject();:

Exception in thread "main" java.lang.NoSuchMethodError: io.searchbox.client.config.HttpClientConfig.isRequestCompressionEnabled()Z at io.searchbox.client.JestClientFactory.getObject(JestClientFactory.java:51) at JestTest.main(JestTest.java:22)

Following is the code:

    JestClientFactory factory = new JestClientFactory();
    factory.setHttpClientConfig(new HttpClientConfig
                            .Builder("http://localhost:9200")
                            .multiThreaded(true)
                            .build());
    JestClient client = factory.getObject();

How can fix this error?

Ian Campbell
  • 23,484
  • 14
  • 36
  • 57
Rhea
  • 165
  • 1
  • 2
  • 8

0 Answers0