public <T> SQLResult<T>  fetchQuery(Class<T> beanType,  String entity) throws ElasticSearchException {
		SQLRestResponse result = this.client.executeRequest("/_xpack/sql",entity,   new SQLRestResponseHandler());
		SQLResult<T> datas = ResultUtil.buildFetchSQLResult(  result,  beanType,  (SQLResult<T> )null);
		datas.setClientInterface(this);
		return datas;
	}
public < T > SQLResult < T > fetchQuery ( Class < T > beanType , String entity ) throws ElasticSearchException { SQLRestResponse result = this . client . executeRequest ( "/_xpack/sql" , entity , new SQLRestResponseHandler ( ) ) ; SQLResult < T > datas = ResultUtil . buildFetchSQLResult ( result , beanType , ( SQLResult < T > ) null ) ; datas . setClientInterface ( this ) ; return datas ; }
发送es restful sql请求/_xpack/sql，获取返回值，返回值类型由beanType决定
@param beanType
@param entity

@param <T>
@return
@throws ElasticSearchException