Closed
Description
What do you want to do?
- Request a change to existing documentation
- Add new documentation
- Report a technical problem with the documentation
- Other
Tell us about your request. Provide a summary of the request and all versions that are affected.
Having issues with using search templates loops https://opensearch.org/docs/latest/search-plugins/search-template/#loops
I have this query
{
"source":{
"query":{
"bool":{
"filter":[
{
"terms":{
"field":["{{#names}}","{{.}}","{{/names}}","3"]
}
}
]
}
}
},
"params":{
"names":["1", "2"]
}
}
which should return items where "field" equals to "1", "2" or "3". But it also return items where "field" is to empty string ("").
Is there another way to destruct "names" array?
pls update docs accordingly
What other resources are available? Provide links to related issues, POCs, steps for testing, etc.
Found similar question just from Elastic Search -> https://stackoverflow.com/questions/67590223/how-to-pass-array-to-elasticsearch-search-template-using-mustache