title: elastic exists query for nested documents
body: <p>I have a nested documents as:</p>
  
  <pre><code>"someField": "hello",
  "users": [
     {
       "name": "John",
        "surname": "Doe",
        "age": 2
     }
  ]
  </code></pre>
  
  <p>according to this <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html" rel="noreferrer">https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html</a>, the above should match:</p>
  
  <pre><code>GET /_search
  {
    "query": {
      "exists" : { "field" : "users" }
    }
  </code></pre>
  
  <p>}</p>
  
  <p>whereas the following should not,</p>
  
  <pre><code>"someField": "hello",
  "users": []
  </code></pre>
  
  <p>but unfortunately both do not match. any ideas?</p>