Template queries and mustache used for collections

Hello @all,

I´m struggling with mustache and collections together with template queries:

my objects/docs:
{
"id":1
"knows":[2,3,4,5]
}
.. and so on

desired query to be rendered:
...
"query" : {
"should": [
{
"term": {"knows": 2 }
},
{
"term": {"knows": 3 }
},
]
}
...

current mustache template (w/o errors while storing):
{
"template" : {
"query" : {
"filtered" : {
"filter" : {
"query" : {
"should": [
"{{#know}}{{ { "term": { "knows": {{know}} } }
}}{{/know}}"
]
}
}
}
}
}
}

passed params (throws Parse Failure [Failed to parse source
[{"query":{"filtered":{"filter":{"query":{"should":[" } } }} } }
}}"]}}}}}]]] ):
{
"params" : {
"know" : [2,3]
}
}

Is anyone able to help me out?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a2dd823a-6270-48e3-b019-78dee5f71e49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.