I have such code in Elasticsearch-DSL:
for family_samples_q in qs:
genotypes_q |= family_samples_q
Search().query('bool', filter=[genotypes_q], minimum_should_match=2)
Unfortunately minimum_should_match applies to the outer scope, to filter (and others if I defined, say, must, another should queries, etc.) but not to inner one, not to genotypes_q list of queries. How to fix that?