Rest High Level Client compatibility?

I think one of the main reasons for the rest client is to provide better compatibility between clients and nodes.

Now as 5.6.0 high level client is released what should be the expectations?
Rest client version X.Y.Z will support what versions of elasticsearch A.B.C?

I am asking because my production cluster is currently on version 5.3.x and I cannot even do a basic search request

doing following snippet with high level client 5.6.0

try (RestClient client = RestClient.builder(HttpHost.create("localhost:9200")).build()) {
    new RestHighLevelClient(client).search(new SearchRequest("test"));
}

against elasticsearch 5.3.3 produces

Exception in thread "main" ElasticsearchStatusException[Elasticsearch exception [type=illegal_argument_exception, reason=request [/test/_search] contains unrecognized parameters: [batched_reduce_size], [typed_keys]]]
at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:177)
at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:526)
at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:502)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:409)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:382)
at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:323)
at com.example.Demo.main(Demo.java:13)
Suppressed: org.elasticsearch.client.ResponseException: GET http://localhost:9200/test/_search?typed_keys=true&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&search_type=query_then_fetch&batched_reduce_size=512: HTTP/1.1 400 Bad Request

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/test/_search] contains unrecognized parameters: [batched_reduce_size], [typed_keys]"}],"type":"illegal_argument_exception","reason":"request [/test/_search] contains unrecognized parameters: [batched_reduce_size], [typed_keys]"},"status":400}
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:354)
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:343)
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119)
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:177)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:436)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:326)
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588)
at java.lang.Thread.run(Thread.java:748)

Please see our blog post The Elasticsearch Java High-Level Rest Client is Out.

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