Subset match query

Hi Mayya, thanks for the quick response.
The solution you posted is working fine, but when I tried to add a nested layer on top, it didn't work. So I was wondering if the terms_set works with nested objects, I looked this post but it has no answers Terms_set within a nested query, and what is happening to me is exactly that. When I used a nested query, there are no results in the response.

It looks like this:

{
        nested: {
          path: 'requirements',
          query: {
            terms_set: {
              'requirements.name': {
                terms: ["Python Advanced", "Critical Thinking"],
                minimum_should_match_script: {
                  source: "params.num_terms"
                },
              },
            }
          }
        }
}

And it works when I copy/paste the one you posted