# Template params problem with ES 2.3

**URL:** <https://discuss.elastic.co/t/template-params-problem-with-es-2-3/48264>\
**Category:** Elasticsearch\
**Created:** [April 24, 2016, 8:01pm UTC](https://discuss.elastic.co/t/template-params-problem-with-es-2-3/48264 "2016-04-24T20:01:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hariharan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hariharan/32/130501_2.png) [@Hariharan](https://discuss.elastic.co/u/Hariharan)\
**Post date:** [April 24, 2016, 8:01pm UTC](https://discuss.elastic.co/t/template-params-problem-with-es-2-3/48264/1 "2016-04-24T20:01:04Z")

</div>

With **Elasticsearch 2.2** , when using a template query with an array of numbers as params, the only possible way to use it was:

GET \_render/template  
{  
"inline": "{"query": { "match" : { "{{my\_field}}" : "{{ **my\_value** }}" } },"size" : "{{my\_size}}"}",  
"params" : {  
"my\_field" : "foo",  
" **my\_value**" : [1,2],  
"my\_size" : 5  
}  
}

Here **my\_value** would be rendered as it is which in this case would be [1,2].

When running the same template with **Elasticsearch 2.3** , my\_value gets rendered as "{0=1, 1=2}" instead of an array. _ **Is this a known issues and is there any other way to solve this?** _

Please note that using as follows would raise **NumberFormatException** for empty strings when its an array of numbers passed as a parameter and querying a number datatype:

GET /\_search/template  
{  
"inline": {  
"query": {  
"terms": {  
"status": [  
"{{#status}}",  
"{{.}}",  
"{{/status}}"  
]  
}  
}  
},  
"params": {  
"status": [1,2]  
}  
}

---

<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:** [July 5, 2017, 10:56pm UTC](https://discuss.elastic.co/t/template-params-problem-with-es-2-3/48264/2 "2017-07-05T22:56:37Z")

</div>


