Java elasticsearch client always null

后端 未结 1 1650
失恋的感觉
失恋的感觉 2020-12-16 21:23

I\'ve recently made the switch from elasticsearch 1.7 to 2.0 and I noticed the way you setup the client has changed. I went through the documentation and for some reason the

相关标签:
1条回答
  • 2020-12-16 21:27

    As noted in the comments, but a little bit more in detail: Elasticsearch 2.0 uses Guava 18.0 (see https://github.com/elastic/elasticsearch/pull/7593). So to fix errors like java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concu‌rrent/Executor;, make sure to use Guava 18.0 as dependency and not other versions.

    0 讨论(0)
提交回复
热议问题