# Using highlight with template query in elasticsearch v 5

**URL:** <https://discuss.elastic.co/t/using-highlight-with-template-query-in-elasticsearch-v-5/65568>\
**Category:** Elasticsearch\
**Created:** [November 9, 2016, 11:40pm UTC](https://discuss.elastic.co/t/using-highlight-with-template-query-in-elasticsearch-v-5/65568 "2016-11-09T23:40:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharat\_Jagannath](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharat_jagannath/32/24299_2.png) [@Sharat\_Jagannath](https://discuss.elastic.co/u/Sharat_Jagannath)\
**Post date:** [November 9, 2016, 11:40pm UTC](https://discuss.elastic.co/t/using-highlight-with-template-query-in-elasticsearch-v-5/65568/1 "2016-11-09T23:40:48Z")

</div>

i'm trying to create a query with the new template query in elasticsearch with highlight fields. but im unable to get the highlighted fields in the response.  
query is something like-  
\_search/template?search\_type=dfs\_query\_then\_fetch  
{  
"id": "suggestions",  
"params": {  
"query\_string": " part",  
"from": 0,  
"size": 5,  
"\_source": {  
"includes": [  
"tag._",  
"dimension\_attribute._",  
"dimension\_name"  
],  
"excludes": []  
},  
"\_type": [  
"dimension",  
"fact"  
],

```
  "stored_fields": [
     "icon",
     "title",
     "typeaheadtext",
     "description",
     "source",
     "url",
     "hint"
  ]

```

}  
}

---

<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:** [December 7, 2016, 11:40pm UTC](https://discuss.elastic.co/t/using-highlight-with-template-query-in-elasticsearch-v-5/65568/2 "2016-12-07T23:40:54Z")

</div>

Closed on December 7, 2016, 11:40pm UTC

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