org.elasticsearch.client.RequestOptions是elasticsearch客户端中唯一找不到的依赖项。

huangapple go评论77阅读模式
英文:

org.elasticsearch.client.RequestOptions is only dependency not found in elasticsearch client

问题

由于某种奇怪的原因,Maven 无法找到以下导入。我不确定它是否已从我从 Maven 获取的依赖项中删除。我能看一下为什么找不到它吗?

import org.elasticsearch.client.RequestOptions;

我正在使用 Elastic 版本 6.3.2,同时使用高级 JAVA REST 客户端版本 6.3.2。我的 POM 文件如下所示:

<dependency>
    <groupId>org.elasticsearch.client</groupId>
    <artifactId>elasticsearch-rest-high-level-client</artifactId>
    <version>6.3.2</version>
</dependency>

<dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>6.3.2</version>
</dependency>
英文:

For some bizarre reason, the following import is not being found by maven. I am not sure if it's removed from the dependency I get from maven or not. Could I please get a look at why it's not being found

import org.elasticsearch.client.RequestOptions;

I am using elastic version 6.3.2 with the high-level JAVA REST client as 6.3.2 also. My POM looks like this below.

         &lt;dependency&gt;
                    &lt;groupId&gt;org.elasticsearch.client&lt;/groupId&gt;
                    &lt;artifactId&gt;elasticsearch-rest-high-level-client&lt;/artifactId&gt;
                    &lt;version&gt;6.3.2&lt;/version&gt;
                &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.elasticsearch&lt;/groupId&gt;
            &lt;artifactId&gt;elasticsearch&lt;/artifactId&gt;
            &lt;version&gt;6.3.2&lt;/version&gt;
        &lt;/dependency&gt;

答案1

得分: 2

RequestOptions 是在 Rest High-Level 客户端的版本 6.4 中引入的。

因此,您需要将您的客户端至少升级到 6.4.0 版本。这个版本可能与 ES 6.3.2 兼容,但可能会出现一些不兼容问题,因为仅支持向前兼容性。

高级客户端保证能够与在相同主版本和大于等于次要版本的任何运行中的 Elasticsearch 节点进行通信。

英文:

RequestOptions was introduced in version 6.4 of the Rest High-Level client.

So you need to upgrade your client to 6.4.0 at least. That version might work with ES 6.3.2 but there might be some incompatibility issues as only forward compatibility is guaranteed.

> The High Level Client is guaranteed to be able to communicate with any Elasticsearch node running on the same major version and greater or equal minor version.

huangapple
  • 本文由 发表于 2020年5月29日 11:11:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/62078058.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定