GetMappings API using Java High Level Rest Client not working

(Rimal) #1


I am not able to execute the GetMappings request using the Java High Level Rest Client.

I am getting an error
Exception in thread "main" ElasticsearchStatusException[Elasticsearch exception [type=illegal_argument_exception, reason=request [my-index/_mapping] contains unrecognized parameter: [master_timeout]]]

GetMappingsRequest request = new GetMappingsRequest();

GetMappingsResponse getMappingsResponse = esClient.indices().getMapping(request, RequestOptions.DEFAULT);

I am using Amazon Elasticsearch v6 . My es java rest client version is 6.4.0

(Stefan Grell) #2

Hi Rimal,

Is the Elastic Version of the Amazon Instance also a 6.4.0?
I had this Exception thrown when I accidentally started my Application with a ES 6.2.4 Node. The GetMappingsRequest works fine with 6.4.0.

(Rimal) #3

No. The amazon es version is 6.3

But with elasticsearch-rest-high-level-client 6.3 version, I cannot find a way to execute a get mapping request.

Found a put mapping request here:

But could not find how to execute a get mapping request .

(system) #4

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