Hi,
I am trying to retrieve some data from elasticsearch using java api.
SearchResponse response = client.prepareSearch("dashboard")
.setTypes("logs")
.setFetchSource(new String[]{"aggregations"}, null)
.addAggregation(AggregationBuilders.terms("DistincProduct").field("productcode"))
.execute()
.actionGet();
Is there a way to get a specifig field from the response like the aggregation field...
(i know about parsing the json text, I am just asking about a common and better solution you are using)
Thank you in advence,