Get results into array with JAVA

I try to using JAVA API to query elasticsearch , but return results not include @timestamp value , and i found the result is shown "message"

SearchResponse response = client.prepareSearch("logstash-")
"))// Query
how to get the "_source" and @timestamp into array and print out ? Please help me out.

java arraylist elasticsearch

try this.

SearchHit[] hits = response.getHits().getHits();
 for (int i = 0; i < hits.length; i++) {

if you dont have any special config in index prevent auto create source. .getSourceAsString() can print it .