Search template - how to pass array of values as parameter

hi,

I am trying to convert an existing query using term_set to a search template. But I am unable to find any documentation that shows how to pass array value as parameter input. There is sample for passing json array to terms. But when using term_set, the field name is already mentioned. So only array values are being passed to terms.

Below is the part of the query that I am trying to convert. I want to pass the values to terms as parameter to template. Can anyone please suggest how this can be achieved?

{
  "term_set" :  {
    "myfieldname" : {
      "boost" : 100,
      "terms" : [ "001", "002" ],
      "minimum_should_match" : "required_matchcount_fieldname"
    }
  }
}

Thanks!

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