title: Aggregation on nested field not working
body: <p>Im unable to do an aggregation on nested documents. Here are 2 of the sample documents:
  document 1</p>
  
  <pre><code>{
    "name": "Samuel Lone",
    "assignments": [
      {
        "subject": "data structures",
        "score": 43,
        "dept": "cs"
      },
      {
        "subject": "fluid theory",
        "score": 37,
        "dept": "ec"
      }
    ]
  }
  </code></pre>
  
  <p>document2</p>
  
  <pre><code>{
    "name": "Manya Pious",
    "assignments": [
      {
        "subject": "data structures",
        "score": 43,
        "dept": "cs"
      },
      {
        "subject": "fluid theory",
        "score": 37,
        "dept": "ec"
      }
    ]
  }
  </code></pre>
  
  <p>When i give the following query for aggregation ,it results in no results.</p>
  
  <pre><code>{
    "aggs": {
      "dept_breakdown": {
        "terms": {
          "field": "assignments.dept"
        }
      }
    }
  }
  </code></pre>
  
  <p>How can I get the aggregation on the field "assignments.dept" done?</p>