title: Perform nested search using elasticsearch dsl
body: <p>Hi I want to perform a nested search using elasticsearch dsl where a document field has nested json data in it so I want specific nested key values from it like -</p>
  
  <p>Below is the document:-</p>
  
  <pre><code>{
    "_index" : "data",
    "_type" : "users",
    "_id" : "15",
    "_version" : 1,
    "found" : true,
    "_source" : {
      "data" : {
        "Gender" : "M",
        "Marks" : "80",
        "name" : "Mayank",
        "Address" : "India"
      },
      "last_updated" : "2017-04-09T01:54:33.764573"
    }
  }
  </code></pre>
  
  <p>I only want field values which are stored in an array. </p>
  
  <p>fields_want = ['name', 'Marks']</p>
  
  <p>Output should be like -> {"name":"Mayank", "Marks":"80"}</p>
  
  <p>Elasticsearch dsl documentation is pretty hard to understandand for me.
  <a href="https://elasticsearch-dsl.readthedocs.io/en/latest/search_dsl.html#" rel="nofollow noreferrer">https://elasticsearch-dsl.readthedocs.io/en/latest/search_dsl.html#</a></p>
  
  <p>Dsl code:-</p>
  
  <pre><code>client = Elasticsearch()
  s = Search(using=client, index="data") \
      .query("match", _type="users") \
      .query("match", _id=15)
  response = s.execute()
  for hit in s:
      print(hit.data)
  </code></pre>
  
  <p>From this code I can get the whole json object under data field.</p>
  
  <p>Can somebody guide me here ?</p>