Elastic java client 8.1 - create index from json example

In
https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/loading-json.html

There is an create index example using the .withJson(input) method

CreateIndexRequest req = CreateIndexRequest.of(b -> b
    .index("some-index")
    .withJson(input) 
);

But in the javadoc I don't see this method exists

Is this documentation error or there is some version mismatch from my side?

This method has been added before 8.1.0 was released.
It will came with 8.1.1 and 8.2.0.

I am also finding the missing ".withJson" problem in 7.17.1:

Same above example is in 7.17 docs:

Getting compile error / no .withJson found using mvn

        <dependency>
            <groupId>co.elastic.clients</groupId>
            <artifactId>elasticsearch-java</artifactId>
            <version>7.17.1</version>
        </dependency>

...not in javadocs

I am guessing from this that the online docs are in error.

This means that will be available in 7.17.2 if released.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.