code: public <T> List<T>  sql(Class<T> beanType , String templateName,Map params) throws ElasticSearchException {
  		SQLRestResponse result = this.client.executeRequest("/_xpack/sql",ESTemplateHelper.evalTemplate(esUtil,templateName, params),   new SQLRestResponseHandler());
  		return ResultUtil.buildSQLResult(result,beanType);
  	}
docs: 发送es restful sql请求/_xpack/sql，获取返回值，返回值类型由beanType决定
  @param beanType
  @param templateName
  @param <T>
  @return
  @throws ElasticSearchException