I am trying to create index with High Rest Client, version 7.17.10
String mappingSource = "{"mappings":{"properties":{"name":{"type":"text"},"age":{"type":"integer"}}}}";
CreateIndexRequest request = new CreateIndexRequest("user-test-demo");
request.source(mappingSource, XContentType.JSON);
CreateIndexResponse createIndexResponse = elasticsearchClient.indices().create(request, RequestOptions.DEFAULT);
The exception I am receiving:
Elasticsearch exception [type=illegal_argument_exception, reason=request [/user-test-demo] contains unrecognized parameter: [include_type_name]]
org.elasticsearch.client.ResponseException: method [PUT], host [http://localhost:9200], URI [/user-test-demo?master_timeout=30s&include_type_name=true&timeout=30s], status line [HTTP/1.1 400 Bad Request]
Any help would be greatly appreciated.