title: search document with null/empty object field in elasticsearch
body: <p>I have an elasticsearch index with following mapping, some documents contain objects of status {id:1, status:"failed"} and some are null, cant seem to find a way where i can search for documents having "status.name" as ["failed", "null", "passed"] (docs where either status is failed, passed or not set/null). e.g doing a term query like below gives empty resultset</p>
  
  <pre><code>{
  "name":{
  "type":"keyword"
  }
   "status": {
                  "properties": {
                      "id": {
                          "type": "integer"
                      },
                      "status": {
                          "type": "keyword"
                      }
                  }
              }
  }
  </code></pre>
  
  <p>query tried:</p>
  
  <pre><code>{
  "terms": {
    "status.name": [  "failed", "null" ]
     }
  </code></pre>
  
  <p>Also tried setting the mapping of status.name as <code>"null_value": "null"</code></p>