title: Elasticsearch Prefix query not working on nested documents
body: <p>I'm using a <strong>prefix</strong> query for an elasticsearch query. It works fine when using it on top-level data, but once applied to nested data there are no results returned. The data I try to query looks as follows:</p>
  
  <p>Here the <strong>prefix</strong> query works fine:
  Query:</p>
  
  <pre class="lang-javascript prettyprint-override"><code>{ "query": { "prefix" : { "duration": "7"} } }
  </code></pre>
  
  <p>Result:</p>
  
  <pre class="lang-javascript prettyprint-override"><code>{
     "took": 25, ... },
     "hits": {
        "total": 6,
        "max_score": 1,
        "hits": [
           {
          "_index": "itemresults",
          "_type": "itemresult",
          "_id": "ITEM_RESULT_7c8649c2-6cb0-487e-bb3c-c4bf0ad28a90_8bce0a3f-f951-4a01-94b5-b55dea1a2752_7c965241-ad0a-4a83-a400-0be84daab0a9_61",
          "_score": 1,
          "_source": {
             "score": 1,
             "studentId": "61",
             "timestamp": 1377399320017,
             "groupIdentifiers": {},
             "assessmentItemId": "7c965241-ad0a-4a83-a400-0be84daab0a9",
             "answered": true,
             "duration": "7.078",
             "metadata": {
                "Korrektur": "a",
                "Matrize12_13": "MA.1.B.1.d.1",
                "Kompetenz": "ZuV",
                "Zyklus": "Z2",
                "Schwierigkeit": "H",
                "Handlungsaspekt": "AuE",
                "Fach": "MA",
                "Aufgabentyp": "L"
             },
             "assessmentSessionId": "7c8649c2-6cb0-487e-bb3c-c4bf0ad28a90",
             "assessmentId": "8bce0a3f-f951-4a01-94b5-b55dea1a2752"
          }
       },
  </code></pre>
  
  <p>Now trying to use the <strong>prefix</strong> query to apply on the nested structure 'metadata' doesn't return any result:</p>
  
  <pre class="lang-javascript prettyprint-override"><code>{ "query": { "prefix" : { "metadata.Fach": "M"} } }
  </code></pre>
  
  <p>Result:</p>
  
  <pre class="lang-javascript prettyprint-override"><code>{
     "took": 18,
     "timed_out": false,
     "_shards": {
        "total": 15,
        "successful": 15,
        "failed": 0
     },
     "hits": {
        "total": 0,
        "max_score": null,
        "hits": []
     }
  }
  </code></pre>
  
  <p>What am I doing wrong? Is it at all possible to apply <strong>prefix</strong> on nested data?</p>