title: elasticsearch empty array search query with c# nest client
body: <p>I have a model in elasticsearch like this:</p>
  
  <pre><code>"hits": [
  {
    "_index": "post",
    "_type": "postmodel",
    "_source": {
      "projectId": "2",
      "language": "en",
      "postDate": "2017-06-11T08:39:32Z",
      "profiles": [
        {
          "label": "Emotional",
          "confidence": 1
        }
      ]
    }
  },
  {
    "_index": "post",
    "_type": "postmodel",
    "_source": {
      "projectId": "3",
      "language": "en",
      "postDate": "2017-06-11T08:05:01Z",
      "profiles": []
    }
  },
  ...
  </code></pre>
  
  <p>By using c# Nest API, i want to fetch the postmodels that has empty profiles (the second post in the example data above). I have tried many ways to write the right query but i've ended up with this query below and still it doesnt give me the right results. My current code looks like this:</p>
  
  <pre><code>var postModels = await _elasticClient.SearchAsync&lt;PostModel&gt;(s =&gt; s
          .Index("post")
          .Query(q =&gt;
          {
              QueryContainer query = new QueryContainer();
  
              query = query &amp;&amp; q.Match(m =&gt; m.Field(f =&gt; f.ProjectId)
              .Query("3"));
  
              query = query &amp;&amp; q.Nested(n =&gt; n.Path(p =&gt; p.Profiles)
                          .Query(qn =&gt; qn.Bool(b =&gt; b.Must(bm =&gt; bm.Match(m =&gt; m
                          .Field(f =&gt; f.Profiles).Query(null))))));
  
              return query;
          }));
  </code></pre>
  
  <p>I would be happy if someone can help me with this problem. Thank you in advance.</p>