if (size != null) {
builder.setSize(size);
}
});
}
<BUG>protected <T> List<T> getList(final Class<T> clazz, final Consumer<SearchRequestBuilder> callback) {
final EsResultList<T> targetList = new EsResultList<T>();
final SearchRequestBuilder builder = getClient().prepareSearch(index).setTypes(type);
callback.accept(builder);
final SearchResponse response = ActionGetUtil.actionGet(builder.execute());</BUG>
final SearchHits hits = response.getHits();

if (size != null) {
builder.setSize(size);
}
});
}
protected <T> List<T> getList(final Class<T> clazz, final Consumer<SearchRequestBuilder> callback) {
final SearchResponse response = getClient().get(c -> {
final SearchRequestBuilder builder = c.prepareSearch(index).setTypes(type);
callback.accept(builder);
return builder.execute();
});
final EsResultList<T> targetList = new EsResultList<T>();
final SearchHits hits = response.getHits();
