SearchResponse as Json

Hi All,

I am using elastic search Java client.

Trying to get the Json for a field. My search request...

SearchResponse response = client.prepareSearch(indexName)

I am getting response in terms of Map of Maps, it will be difficult for me to get the data for each field and populate a pojo and searilalize it to send to front end.
I just want whatever json available in the Elastic search for that field as response.

I did : String responseString = response.toString();

but it gives the response with all the unwanted headers.

Please suggest.