Skip to content

IndicesClient.exists() can not be resolved #28789

@philboeselager

Description

@philboeselager

Elasticsearch version (bin/elasticsearch --version): 6.2.1

Plugins installed: []

JVM version : 1.8.0_111 (build 1.8.0_111-b14)

OS version : Linux 4.4.0-112-generic #135-Ubuntu x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:

Following the official documentation , there should be a method exists(GetIndexRequest) .

But actually, there's no such method to be found in javadoc, sources, and therefore, the method can not be resolved.

Steps to reproduce:

  1. use dependency "org.elasticsearch.client" % "elasticsearch-rest-high-level-client" % "6.2.1"

  2. code:

    final RestClientBuilder builder = RestClient.builder(new HttpHost("localhost", "9200", "http"));
    final RestHighLevelClient client = new RestHighLevelClient(builder);
    final GetIndexRequest request = new GetIndexRequest().indices("myindex");
    assert(client.indices().exists(request));

  3. compile

Alternatively, checkout https://github.com/hbz/oerworldmap/blob/1441-upgradeElasticsearch/app/services/ElasticsearchConfig.java#L119

Provide logs (if relevant):

Error message is:

org.elasticsearch.action.admin.indices.get.GetIndexRequest cannot be converted to org.elasticsearch.action.get.GetRequest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions