title: select matching objects from array in elasticsearch
body: <pre><code>{
      class: 1,
      users: [{
          name: 'abc',
          surname: 'def'
      }, {
          name: 'xyz',
          surname: 'wef'
      }, {
          name: 'abc',
          surname: 'pqr'
      }]
  }
  </code></pre>
  
  <p>I have a document structure like above object and I want to return only users who have name 'abc' but problem is it matches name 'abc' but returns 
  all array. I want only matched users .</p>
  
  <p>Mapping - </p>
  
  <pre><code>{
          "class":"string",
          "users" : {
              "type" : "nested",
              "properties": {
                  "name" : {"type": "string" },
                  "surname"  : {"type": "string" }
              }
          }
      }
  </code></pre>