title: elasticsearch get only parents documents from index
body: <p>I'm trying to get all parent documents from an index.
  there is any way to do this?</p>
  
  <p>I have tried this:</p>
  
  <pre><code>"must": [
      {
        "nested": {
          "path": "join",
          "query": {
            "match": {
              "name": "post"
            }
          }
        }
      }
    ]
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>"must": [
      {
        "has_child": {
          "type": "comment",
          "query": {},
          "min_children": 0
        }
      }
    ], 
  </code></pre>