logger.info("We found {} beers", sr.getHits().totalHits());
int nbHeineken = 0;
int nbPale = 0;
for (SearchHit hit : sr.getHits()) {
Beer beer = BeerHelper.toBeer(hit.getSourceAsString());
if ("Heineken".equals(beer.getBrand())) nbHeineken++;
if (Colour.PALE.equals(beer.getColour())) nbPale++;
}
logger.info("For the first 100 beers, we have {} Heineken and {} pale beers", nbHeineken, nbPale);
logger.info("Full json result is: {}", sr.toString());