NEST Conditional filter query with multiple terms
<p>I would like to do a ElasticSearch query like this:</p>

<pre><code>{
    "query" :
    {
        "bool" :
        {
            "filter" : [
                {
                    "terms" :
                    {
                        "name" : ["name1", "name2"]
                    }
                },
                {
                    "terms" :
                    {
                        "color" : ["orange", "red"]
                    }
                }
            ]
        }
    }
}
</code></pre>

<p>I've tried to implement it in NEST like this:</p>

<pre><code>_elasticClient
    .SearchAsync&lt;MyDocument&gt;(s =&gt;
        s.Index("myindex")
            .Query(q =&gt; q
                .Bool(bq =&gt; bq
                    .Filter(fq =&gt;
                    {
                        QueryContainer query = null;

                        if (nameList.Any()) {
                            query &amp;= fq.Terms(t =&gt; t.Field(f =&gt; f.Name).Terms(nameList));
                        }

                        if (colorList.Any()) {
                            query &amp;= fq.Terms(t =&gt; t.Field(f =&gt; f.Color).Terms(colorList));
                        }

                        return query;
                    })
                )
            )
    );
</code></pre>

<p>But that gives me a query like this where the filters are wrapped inside a <em>bool must</em>:</p>

<pre><code>{
    "query" :
    {
        "bool" :
        {
            "filter" : [
                {
                    "bool" :
                    {
                        "must" : [
                            {
                                "terms" :
                                {
                                    "name" : ["name1", "name2"]
                                }
                            },
                            {
                                "terms" :
                                {
                                    "color" : ["orange", "red"]
                                }
                            }
                        ]
                    }
                }
            ]
        }
    }
}
</code></pre>

<p>How should I change my NEST code to give me the right query? Do have have to add my terms to something other then a <em>QueryContainer</em>?</p>