title: Elasticsearch 5.0 Java client "ParsingException[no [query] registered for [query]]"
body: <p>When executing the template query using the java client API, I'm getting this error:</p>
  
  <blockquote>
    <p>Caused by: ParsingException[no [query] registered for [query]] ?. </p>
  </blockquote>
  
  <p>Please find the template query below:</p>
  
  <pre><code>POST /_search/template/lookup_temp
  {
      "template":
      {
                 "query": {
                     "query_string":
                     {
                          "query": {
                              "city_key":"{{phyCity}}"
                          }
                     }
                 }
              }    
  }
  </code></pre>