title: Elasticsearch has_child not returning back all parent documents
body: <p>Here is the mapping data for both <code>customer</code> and <code>customer_query</code> documents, where <code>customer</code> is the parent and <code>customer_query</code> the child document. </p>
  
  <p><img src="https://i.stack.imgur.com/whfNK.png" alt="customer">
  <img src="https://i.imgur.com/xPDyMId.png" alt="customer_query"></p>
  
  <p>When I run a generic search against all <code>customer_query</code> documents, I get back 127 documents. </p>
  
  <p><img src="https://i.imgur.com/gD0qlA1.png" alt="all customer_query docs"></p>
  
  <p>However, when I run the following query against the parent</p>
  
  <pre><code>curl -XGET "http://localhost:9200/fts_index/customer/_search" -d'
  {
    "query": {
      "has_child" : {
          "type" : "customer_query",
          "query" : { "match_all": {} }
          }
      }
    }
  }'
  </code></pre>
  
  <p>I get back only 23 documents. There should be 127 documents returned back since each <code>customer_query</code> document has a unique parent id assigned to it that does match up to the <code>customer</code> type.</p>
  
  <p>When I retry creating my <code>customer_query</code> documents, I get a different number of documents back each time leading me to think it is some kind of shard issue. I have 5 shards assigned to the index.</p>
  
  <pre><code>{
    "took" : 59,
    "timed_out" : false,
    "_shards" : {
      "total" : 5,
      "successful" : 5,
      "failed" : 0
    },
    "hits" : {
      "total" : 23,
      "max_score" : 1.0,
      "hits" : [ {
        "_index" : "fts_index",
        "_type" : "customer",
        "_id" : "7579f2c0-e4e4-4374-82d7-bf4c508fc51d",
        "_score" : 1.0,
        "_routing" : "8754248f-1c51-46bf-970a-493c349c70a7",
        "_parent" : "8754248f-1c51-46bf-970a-493c349c70a7",
        ....
  </code></pre>
  
  <p>I can't wrap my head around this issue. Any thoughts on what could be the issue? Is this a routing issue? If so, how do I rectify that with my search?</p>