# Alternative for Template Query in ES 7.x (Search template call/pass to another template)

**URL:** <https://discuss.elastic.co/t/alternative-for-template-query-in-es-7-x-search-template-call-pass-to-another-template/296265>\
**Category:** Elasticsearch\
**Created:** [February 4, 2022, 8:23am UTC](https://discuss.elastic.co/t/alternative-for-template-query-in-es-7-x-search-template-call-pass-to-another-template/296265 "2022-02-04T08:23:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjwahyudi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mjwahyudi/32/101359_2.png) [@mjwahyudi](https://discuss.elastic.co/u/mjwahyudi)\
**Post date:** [February 4, 2022, 8:23am UTC](https://discuss.elastic.co/t/alternative-for-template-query-in-es-7-x-search-template-call-pass-to-another-template/296265/1 "2022-02-04T08:23:06Z")

</div>

Hi All,

I have task to migrate old query from ES 5.x that built/migrated from ES 2.x (it is so old). In the query, it is using template query ([Template Query | Elasticsearch Reference [5.6] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-template-query.html)).

When I try to using ES 7.x, as it mention in Guide 5.6, it was deprecated. Do you have suggestion how I can move on?

---

<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:** [March 4, 2022, 8:23am UTC](https://discuss.elastic.co/t/alternative-for-template-query-in-es-7-x-search-template-call-pass-to-another-template/296265/2 "2022-03-04T08:23:41Z")

</div>

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