java.lang.NoSuchMethodError:io.searchbox.client.config.HttpClientConfig.isRequestCompressionEnabled()Z

时间:2016-06-08 16:42:37

标签: rest elasticsearch jest

我正在尝试使用Jest Client for REST调用进行弹性搜索。我在行中遇到以下错误:JestClient client = factory.getObject();':

线程中的异常" main" java.lang.NoSuchMethodError:io.searchbox.client.config.HttpClientConfig.isRequestCompressionEnabled()Z at io.searchbox.client.JestClientFactory.getObject(JestClientFactory.java:51)     在JestTest.main(JestTest.java:22)

以下是代码:

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

任何决议都会有所帮助。谢谢:))

0 个答案:

没有答案