# Java HLClient and "include\_type\_name" in migration from 6.7.1 to 7.0.0

**URL:** https://discuss.elastic.co/t/java-hlclient-and-include-type-name-in-migration-from-6-7-1-to-7-0-0/178033
**Category:** Elasticsearch
**Created:** [April 23, 2019, 11:59am UTC](https://discuss.elastic.co/t/java-hlclient-and-include-type-name-in-migration-from-6-7-1-to-7-0-0/178033 "2019-04-23T11:59:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Vasily\_RW](https://avatars.discourse-cdn.com/v4/letter/v/ad7895/32.png) [@Vasily\_RW](https://discuss.elastic.co/u/Vasily_RW)
#### Post date: [April 23, 2019, 11:59am UTC](https://discuss.elastic.co/t/java-hlclient-and-include-type-name-in-migration-from-6-7-1-to-7-0-0/178033/1 "2019-04-23T11:59:15Z")

</div>

After upgrading the Java client to 7.0.0 (the database is still 6.7.1) I am getting a "[types removal]" warning in Java High Level REST Client. Is there a way to explicitly specify "include\_type\_name" in type-less API, so that this code can work with databases 6.7.1 and 7.0.0 during the migration? Or should I use the Java client 6.7.1, then migrate my database to 7.0.0, and finally upgrade the client to 7.0.0? Any suggestions appreciated.

I am currently using API:  
`org.elasticsearch.client.IndicesClient.putTemplate(org.elasticsearch.client.indices.PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options)`

The warning:  
`[types removal] The parameter include_type_name should be explicitly specified in put template requests to prepare for 7.0. In 7.0 include_type_name will default to 'false', and requests are expected to omit the type name in mapping definitions.`

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 21, 2019, 11:59am UTC](https://discuss.elastic.co/t/java-hlclient-and-include-type-name-in-migration-from-6-7-1-to-7-0-0/178033/2 "2019-05-21T11:59:16Z")

</div>

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