class ESRichClientImp implements ESClient {

    @Override
    public ESResponse search(SearchRequest searchRequest) throws ElasticsearchException, IOException, JSONException
    {
        try
        {
            SearchResponse response = rhlclient.search(searchRequest);
            LOGGER.debug("response={}", CommonUtil.removeEscapingCharacters(response.toString()));
            Map<String, Object> map = QueryUtil.toMap(QueryUtil.extractAggregationValue(response));
            return new ESResponse(response, map);
        }
        catch (ElasticsearchException e1)
        {
            throw e1;
        }
        catch (Exception e2)
        {
            throw e2;
        }
    }

    public  ESRichClientImp(Properties properties);
    public  ESRichClientImp(RestHighLevelClient rhlclient);

}